In tabular form, is there a way to select one row as the default row?

Hi, I have a tabular form which lists the many addresses that a fisherman may have. The query is: select default_addr_flag, addr1, addr2, city, state, zip from addresses where fisher_id = :PXX_fisher_id.
I would like to have them set the default_addr_flag = 'Y' for ONLY ONE record....so even if they have many addresses, one must be selected as the default for any correspondence.
Are there any examples, or does anyone have a suggestion. thank you!
karen

Hi Karen,
I think first of all you should get yourself a browser and add-ons that allow you to inspect the HTML DOM elements. E.g. FF/Firebug/Error Console. Once you have the required tools you will be able to see for yourself what the DOM has, and then work out what you need to do.
Most members, including myself, at times post solutions without really trying them out as they appear to be "obvious" even when they are not.
Taking forward from the point where you have made the default address indication a "simple checkbox" from the Report Attributes tab, if you inspect the checkbox element you will find that it is somewhat more complex and Apex has created the elements with some JS code. E.g. this is a snippet from one of my application pages.
<td headers="IS_CUSTOMER">
<label class="hideMeButHearMe" for="f08_0001">Is Customer</label>
<input type="checkbox" onclick="if (this.checked) {apex.jQuery('#f08_0001').val('Y');} else {apex.jQuery('#f08_0001').val('');}" id="f08_0001_01" checked="checked" value="Y" name="f08_NOSUBMIT" autocomplete="off">
<input type="hidden" id="f08_0001" value="Y" name="f08" autocomplete="off">
</td>You will see that
a.Apex has created a onclick event trigger
b. If sets the value of Unchecked checkbox to null ("").
c. In my page the checkbox maps to f08, you need to see which item it maps to in your page.
d. The id of the rendered checkbox is id of hidden element + _01.
The consequence of this is that if you define a onclick trigger in the Element attributes it overrides and suppresses Apex from inserting its own JS code!
To be able to uncheck all checkboxes other than the one the user has currently checked you will need to do this:
i. In the Column's Element Attributes field write onclick="doDftAddr(this);"You could name the function the way you want it, this is an example.
ii.In the Page HTML Header write
<script type="text/javascript">
function doDftAddr(pThis) {
  va = pThis.id.split("_");
  var vb = va[0]+'_'+va[1];
if (pThis.checked) {
    vy = 'input:checked[id^="'+va[0]+'_"]'
    $("["+vy+"]").attr("checked",false);
    apex.jQuery("["+vy+"]").val('N');
    apex.jQuery('['+'input:hidden[id^="'+va[0]+'"_]'+']').val('N');
    apex.jQuery('#'+pThis.id).attr("checked",true);
    apex.jQuery('#'+pThis.id).val("Y");
    apex.jQuery('#'+vb).val('Y');
   } else {
    apex.jQuery('#'+vb).val('N');
</script>Cheers,

Similar Messages

  • Data Sets - Is there a way to put two fields in the same row?

    I am working on my first Spry Data Set (in Dreamweaver CS4) which, if I can get it figured out, will eventually be used as a calendar on a client's web site. You can see the beginning of the project here:
    http://www.rieradesignco.com/calendarlist_spry.html
    My question is, can I put two or more fields on one row? Specifically, I would like the part that looks like this...
    3
    [WED]
    Fusion
    ... to look like this:
    3   [WED]   Fusion
    I tried simply moving the fields (in Design View) so that they looked like they would be in the same row, but as you can see, that didn't do the trick. (You can see what I did here, in the highlighted part of the screenshot:  http://www.rieradesignco.com/spryquestion.jpg). I also tried nesting a table within the table on my html data document that contained the three fields I needed - it worked okay, but that just makes the table more difficult to work with. I don't want to simply type the three items into one field, because it will be a long list and they all need to line up perfectly.
    Is there another way to do it?

    Change the following line to include the red coloured parts
    <div class="MasterColumn" spry:repeat="ds4" spry:setrow="ds4" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">
      <span>{Dsp_#}</span><span>{Dsp_WkDay}</span><span>{Dsp_Event}</span>
    </div>
    The add the following style rule to your document:
    .MasterColumn span {
        display: inline-block;
    I hope this helps.
    Ben

  • TS4036 is there a way to restore one item in the back up without erasing the entire ios devise or can you view your back up from your computer to save to the computer?

    I erased an important recording off of my iphone 5.  It was backed up to the cloud but I don't want to erase everything else to restore this.  Is there a way to restore one item or is there a way to go into the cloud on the computer and download the recording?

    Welcome to Apple Support Communities
    One of the cons of backups is that you have to restore the whole backup in order to restore one item.
    As you have a backup, open Settings > General > Reset > Erase All Content and Settings. After erasing the device, it will ask you to restore a backup, so follow the steps. It's long but it's the only way to get this video back

  • Is there a way to prevent psd from being the default file extension?

    In previous versions, psd was added automatically if the document was layered. Since I don't use psd, I had to manually change to tiff.
    But I'm finding that even flat (unlayered) files that came in as jpgs have psd inserted as the default. I would have thought that, by default, a file could stay whatever it started out being. (Whether jpg or tiff, flat or layered).
    This happens when I "save as" even when I don't change the name of the file, only save it in a different location (such as a jpg file from a flashcard being saved to computer).
    Is there a way to prevent the extra step of rejecting psd? Is there a preference or something I have missed?

    Although the little camera I was using doesn't capture 16 bit, I did run the jpgs briefly through ACR to try out the shadows/highlight feature since the photos were perfect candidates. My preference there is to convert to 16 bit ProPhoto so maybe--even though the files opened as jpgs. That might be the problem: maybe bit depth is the trigger for psd assignment. Still, I wish there was a way to disable it.

  • Need help with a calculated column - is there any way to reference a value in the current row?

    Hey guys,
    I'm a bit of a DAX newbie, and I'm running into a block. I'm creating a Power View report about IT tickets. We are going to be creating a cube to automate the data soon, I'm currently working with a flat Excel Data Table of data to demonstrate the Power
    View reporting capabilities to the team. I need the default display to show the top 4-5 items basked on the Ticket Count. The three applicable columns I'm using are the TicketID, the ContactReason, and the AssetCategory - all three are
    text. One slide will show the top five Contact Reasons by Ticket Count, and the other will show the top five Categories by Ticket Count. The users will see this default view, but will be able to change it to see differently ranked items or can clear the
    ranking slicer altogether.
    What I've accomplished so far is to create the Calculated Field [Ticket Count] = COUNTA(Table1[TicketID])
    And 2 other calculated fields:
    [Contact Rank] = RANKX(ALL(Table1[ContactReason]),[Ticket Count],,,DENSE)
    [Asset Rank] = RANKX(ALL(Table1[AssetCategory]),[Ticket Count],,,DENSE)
    If I were creating a Pivot Table, this would be great. These fields calculate everything the right way. The problem is, I need to have a Rank slicer on each slide and the calculation by itself contains no data - with no data, there's nothing to slice. I
    realized I need to actually have columns of data so I can create a slicer. I need each row of the table to show the same [Contact Rank] for every instance of a particular ContactReason (and the same for the [Asset Rank] and AssetCategory).
    The RANKX formulas pasted into the Calculated Column section only show a value of 1 - with no Pivot table summarizing the fields, it's counting each row's ticket once, giving every line the tied Rank of #1.
    I've solved the problem in Excel by creating 2 Pivot Tables on a separate sheet that have the data field and the calculated field for ContactRason and AssetCategory. Then on my Excel Data Table, I've added two columns that do a VLOOKUP and pull over a the
    Calculated Rank from each Pivot Table that match the ContactReason and AssetCategory fields. This works on the flat Excel Data Table now, but will not be a solutions when we start pulling the data from the cube (and there is no flat table).
    What I think I need is an Expression for the RANKX formula that can give me, for each row, the count of all of the times a ContactReason shows up in an entire column. There's only about 100,000 lines of data and each ContactReason or AssetCategory
    may show up several thousand times. But if I can get the expression to return that count, then the RANKX formula should work in the Column. If it wasn't a DAX formula, I'd use a COUNTIF and say 'Count the entire ContactReason column anytime it's equal to the
    ContactReason on THIS row', but in DAX I don't know how to reference a single value in a row. I've tried the CALCULATE() formula, but it seems like the filter needs a specific value, and doesn't work on a dynamic "cell" value.
    Any help would be greatly appreciated! (I hope it all makes sense!)

    If I've understood you correctly then the ALLEXCEPT function may be what you're after and it could be applied in a similar way to the following...
    =
    RANKX(
    ALL(Table1),
    CALCULATE(
    COUNTROWS(table1),
    ALLEXCEPT(Table1, Table1[ContactReason])
    DENSE
    If this has missed the mark, would it be possible to clarify the requirement further?
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com
    Blog: http://www.nimblelearn.com/blog
    Twitter: @nimblelearn

  • Is there a way of selecting one colour in an image?

    I have a 4 colour image and I need to do alternative colourways.
    Is there a quick way of selecting all of one colour so I don't have to select each area individually?
    Thanks for helping, it will save me a lot of time!!

    Another option is to do Image - Adjust - Hue/Saturation, choose the color from the list (e.g., "Reds"), then adjust Hue/Sat for just that color. 
    If you're knowledgeable about adjustment layers, it might be preferable to do this with a Hue/Saturation adjustment layer.
    Once you have chosen a color category in the Hue/Saturation dialogs, you can click on the actual color in the image to fine tune the center of the range, and you can move the range ends to change the range the colors affected and how smooth the transition will be.
    -Noel

  • Is there a way to select multiple items in the open dialogue (ctrl+O)?

    Sometimes I would like to open multiple items at once using ctrl+O, but in the dialogue, I can only select one item at a time.
    This also applies to Firefox 4.

    No, sorry. I suppose you could try running the files via Windows Explorer.

  • Is there a way to set Thunderbir​d as the default contact list in your PC?

    I am trying to link my Q10 to my PC in order to save my contacts and calendar.  It is trying to use Microsoft Outlook but I don't use that program and I want my contacts to be saved in my computer not in a cloud somewhere.  Any hints on how to make this work or if it is even possible?
    Thanks.

    Hi and Welcome to the Community!
    Nope...refer:
    http://docs.blackberry.com/en/smartphone_users/del​iverables/59312/tom1359418099212.jsp
    BB10 was originally designed without any direct sync and only via cloud-based services...Outlook was added recently, but so far no other desktop PIMs have shown up as compatible.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Is there a way to reset Profile manager to the default settings (i.e.) like it was never set up without reinstalling?

    I recently set up profile manager wrong and need to reconfigure it. Any Ideas?

    Brilliant! Thank you. To get this working in my case, I need to make a few tweaks to the commands:
    sudo su -         #Since I have a different ruby install avaliable to my local user and that breaks things.
    cd /usr/share/devicemgr/backend
    serveradmin stop devicemgr
    serveradmin start postgres
    RAILS_ENV="production" rake db:drop
    RAILS_ENV="production" rake db:create
    RAILS_ENV="production" rake db:migrate
    serveradmin start devicemgr

  • Is there a way to automatically add another of the same page while a form is being filled?

    Is there a way to automatically add another of the same page while a form is being filled?
    I have a two-page form of which the second page is essentially a spreadsheet analog.  Often, there is need for for more lines than are available on the page.  Is there a way in which to add another or even multiple copies of the second page? 
    Thanks ahead...
    TG

    You can do that with a dynamic XFA form created in LiveCycle Designer, which comes with Acrobat Pro for Windows. For more information, you can ask over at the LiveCycle Designer forum.

  • Is there a way to delete one of several checkboxes from a pdf form without the leftover checkboxes automatically renumbering themselves?

    Is there a way to delete one of several checkboxes from a pdf form without the leftover checkboxes automatically renumbering themselves?
    I used LiveCycle Designer to make a pdf form with many checkboxes. When I deleted a few of the checkboxes the rest left on the form renumbered themselves. This made my JavaScript out of sync since the JavaScript checkbox numbers did NOT update automatically. I am hoping there is a preference option to not auto update. I just cannot find it,

    I believe you're using the same name for each checkbox, right?!
    If so, each checkbox has an index number which represents its position relative to the other copies in the XML tree and when you add, delete or reorder the copies the index will always be recreated because thats the way how XML works.
    There is no way to stop Designer from doing this, I'm afraid.
    To address individual objects through JavaScript you should use unique names.

  • A word document was emailed to me.  I can open the document without a problem.  Is there a way for me to type on the document.... to fill out the form?  When I click the fields, the virtual keyboard does not appear.

    A word document was emailed to me.  I can open the document without a problem on my iPad 2.   Is there a way for me to type on the document.... to fill out the form?  When I click the fields, the virtual keyboard does not appear.

    If you want to edit a word document then you will need an app on your iPad that supports word so that you can copy them to it via 'open in' e.g. Apple's Pages app or a third-party app such as Documents To Go or QuickOffice HD

  • Is there a way to select a word in a pdf form and have it circled

    is there a way to select a word in a pdf form and have it circled instead of say check marked

    https://discussions.apple.com/community/professional_applications/final_cut_stud io
    Al

  • Is there a way track who you have distributed the form to and who has responded? If yes, is there a way to message all that have not responded?

    Is there a way track who you have distributed the form to and who has responded? If yes, is there a way to message all that have not responded? This would be a great way to manage supplier questionnaires to ensure everyone is providing information back to you.

    FormsCentral, itself, does not have a method of distributing forms, so it would not know about your distribution list. It's either an open online form, which can be gotten to by anyone with the URL, or it's a pdf, which could be distributed via e-mail or a web page download.
    You can always track the completion of the form by looking in the form's collected data set. Then, you could work backward to contact those recipients who have not yet responded. But that means you need to keep track of where the form was sent, or at least know which people/companies were supposed to get the form.
    I hope that helps,
    Brian

  • Is there a way to create a playlist from the now playing screen on ios7?

    Is there a way to create a playlist from the now playing screen on ios7? I want to be able to hear a song in my collection and immediately add it to an existing playlist or create a new playlist.
    Thank you in advance

    Hi Cornellius,
    From the now playing screen there's a Create button at the bottom that allows you to create a
    Genius Playlist
    New Station form Artist
    New Station from Song
    IPhone Help, Browse and play
    http://help.apple.com/iphone/7/#/iph3cf21a82
    The Now Playing screen provides playback controls and shows you what’s playing.
    For information on Genius Playlists, see
    Archived - Genius for iPod and iPhone
    http://support.apple.com/kb/HT2978
    I don't see an option to add it to an existing playlist.
    Best Regards,
    Nubz

Maybe you are looking for

  • Aspect ratio of NTSC monitor display

    We're working on a FCP 4.5 project that's shot 16:9, and displays with the correct widescreen aspect in the canvas window (so long as pixels are displayed square). However, when I run mirrored video through a Sony DSR11 deck to an NTSC monitor, the p

  • Disable wireless broadcasting - HP laserjet pro 400 color mfp m475dw

    How do I disable SSID broadcasting for HP laserjet pro 400 color mfp m475dw.  I have turned off wireless configuration through printer web console, but it is still broadcasting.  I have also updated the firmware to latest available 20131028. This que

  • Factory method

    Hey all, I am tying to learn factory method and working on an example from the Oreilly AS3 Design patterns book. I am attempting figure out how all the classes work together in this design pattern and I have a question I am hoping someone might be ab

  • Video freezing on playback

    I'm using Premiere Pro CS5 I've put a home movie together with music I exported my video into .AVI format. My problem is that after I export it and play it back my picture freezes but the video keeps playing I can tel because of the music and the vid

  • That fuzzy type thing again

    I am using the same phrase on every frame, but as the show goes on, the type suddenly gets fuzzy. Even if I retype it in place. Even if i copy, paste-in-place from a good one. All this type is on even coordinates. Static type, anti-alias off (the sha