Need help Updating Records in a Report Region

We have created some javascript to check a drop down used in a report region.
This is the way the report is supposed to work:
The first time the user comes to this screen he will go down the list and select a value of '1' or '2' for col2.
When col2 drop down has a value of 1 then we want to disable col3 and col4.
Then the user will click on the Submit button.
When he clicks on the Submit button then we want to set col4 to have a value of sysdate in the database table for any record where col2 had a value of 1.
The next time the user comes to this screen he will select values for col3 and col4 of the records that col2 had a value of 2 (meaning col3 and col4 are enabled)
This works fine if there is only one record in the report region.
The problem is when we have more than one record.
for example:
Say we have two records...
for record1 the user selects '1' for col2 and for record2 the user selects '2' for col2.
When the user clicks on the Submit button col3 and col4 get disabled and col4 gets set to sysdate for record1, while col3 and col4 remain available but empty (because the user has not made a selection for these columns at this point) for record2.
When the user comes back to this screen he now selects a value for col3 and picks a date for col4 for record2. When he clicks on the Submit button the value for col3 and the date entered in col4 for record2 should get updated in the database table and it is but the col3 value and the col4 date is being inverted with record1's data for some reason.
Can you please tell me how to fix this?
This is what the user has selected on the screen:
(COL2) (COL3) (COL4)
Requested? Granted? Response Date
Record1 NO - 13-APR-09
Record2 YES YES 20-APR-09
After the user clicks on the Submit button this is how the screen displays it back:
(COL2) (COL3) (COL4)
Requested? Granted? Response Date
Record1 NO YES 20-APR-09
Record2 YES N/A 13-APR-09
I am including the code from my update staement below:
DECLARE
A_ID NUMBER;
requested NUMBER;
grnted NUMBER;
respdate DATE;
f01 = AID ID
f02 = REQUESTED YES OR NO
F03 = GRANTED YES OR NO
F04 = RESPONSE DATE
BEGIN
FOR i IN 1..HTMLDB_APPLICATION.G_F01.COUNT LOOP
BEGIN
A_ID      := HTMLDB_APPLICATION.G_F01(i); -- this is hidden
requested := HTMLDB_APPLICATION.G_F02(i); -- (YES or NO)
grnted := HTMLDB_APPLICATION.G_F03(i); -- (YES or NO)
respdate := to_date(HTMLDB_APPLICATION.G_F04(i),'MM/DD/YYYY');
EXCEPTION
WHEN OTHERS THEN
A_ID      := HTMLDB_APPLICATION.G_F01(i); -- this is hidden
requested := HTMLDB_APPLICATION.G_F02(i); -- (YES or NO)
grnted := 3; -- (YES or NO)
respdate := sysdate;
END;
UPDATE TBL_AIT
SET b_requested_id = requested,
b_granted_id = grnted,
b_response_date = respdate
WHERE ait_id = A_ID;
END LOOP;
END;

Hi,
Any disabled items are not submitted with the page - therefore, your f03 and f04 collections would be one value short. This is a browser feature rather than an Apex feature.
You can get around this by enabling all items before the submit takes place. Have a look at: Re: A better method of handling tabular forms with variable column type? This is for disabling items mainly, but includes an enableItems() javascript function that should help you.
Andy

Similar Messages

  • Need help: updating records from a node to another node.

    Hi Gurus,
    I guess most of you would be laughing at me but I'll not from Java background but.
    scenario:
    I have a node (eg. Node A) containing some records, say...with keys A,B,C,D,E.
    I also having anothe node (eg Node B) containing the update records of some of the Keys, eg. A,D,E
    How do I update node A with the updated values of node B.
    a ABAP representation would be:
    LOOP AT NODE_B.
      LOOP AT NODE_A.
        IF NODE_A-KEY = NODE_B-KEY.
          MOVE-CORRESPONDING NODE_B to NODE_A.
          MODIFY NODE_A.
        ENDIF.
      ENDLOOP.
    ENDLOOP.
    thanks.

    Hi Jansen,
    Are you using model node or value? If it is model node you need store in Node B just reference to model class from Node B. If it is value node then you can store keys of elements from Node A moved to Node B in some java Map implementation.
    Best regards, Maksim Rashchynski.

  • Need help updating records from a subset yielded by a subquery.

    Hi, retired, hobby coder needing (further) help in transact-sql scripting with a view to creating a stored procedure within a Sequel DB.  For the purposes of this investigation I have a table with 23 records.   I am trying to update a specific
    field for 10 of the records based on the (TOP 10) records selected from a sub query where I select the TOP 20 records based upon different field.
    I select my desired 10 records (TOP 10) from a sup query selecting the TOP 20 based upon the date field (latest 20) for a specific user (GID) as follows:
    I then attempt to update only these 10 records as follows:
    As you can see it updated all 23 rows in the table, not just the 10 I yielded by the underlying query.
    In reviewing the documentation it appeared that referencing the Scores_id column and using the 'IN' keyword would work, i.e., UPDATE Scores WHERE Score_id IN (SELECT TOP 10* ..... would be appropriate but I got the an error message, 'Only one expression
    can be specified in the select list when the subquery is not introduced with EXISTS.'
    Can someone assist me with the proper syntax for this script?  Additionally, since there are limitations on the number of variables which can be used any advice on how to structure a stored procedure where the GID is the initial variable and Score_id
    the second would be appreciated also.
    Regards,
    Minuend

    The query you have written will always update all or no rows in the table, since it says
    UPDATE Scores
    SET    ...
    WHERE  EXISTS (...)
    The EXISTS clause is, logically, evaluated for each row. Normally, when you use EXISTS you correlated the subquery with the surrounding query, so that the values the subquery works with are different for each row. But your subquery is uncorrelated, and will
    return the same value, TRUE or FALSE, for each row.
    IN can certainly work, but then you cannot have "SELECT TOP 10 *", but you need to have "SELECT TOP Score_id", since when you use IN, the subquery must be a single-column query.
    Another alternative, which is somewhat difficult to digest the first you see it, but which is more efficient, and more concise, once you have learn it, is to work directly from the query you have:
      WITH CTE AS (
         SELECT TOP 10 *
          FROM (SELECT TOP 20...
     UPDATE CTE
     SET    Used = '*'
    Erland Sommarskog, SQL Server MVP, [email protected]

  • HT1267 i need help updating without wifi hook up. I was told I could do through my "itunes"

    I need help updating without wifi hook up. I was told I could do it through my "itunes"

    after selecting restore from backup, you should see a screen asking you wich backup (on the computer)

  • HT1338 need help updating to snow leopard

    need help updating to snow leopard

    Hi Billy,
    First you need to research all the problems people are having with the higher OSX versions, & make sure you have a bootable clone of what you have just in case.
    then you must get 10.6 if they still have it, install it & update to 10.6.8 so you have the App Store to buy & download the huge 10.8 Installer.
    Snow Leopard/10.6.x Requirements...
    General requirements
       * Mac computer with an Intel processor
        * 1GB of memory (I say 4GB at least, more if you can afford it)
        * 5GB of available disk space (I say 30GB at least)
        * DVD drive for installation
        * Some features require a compatible Internet service provider; fees may apply.
        * Some features require Apple’s MobileMe service; fees and terms apply.
    Which apps work with Mac OS X 10.6?...
    http://snowleopard.wikidot.com/
    It's been pulled from the online store & Apple Stores, so you have to call Apple to buy it, last I heard.
    Call Apple Sales...in the US: 1-800-MY-APPLE. Or Support... 1-800-275-2273
    Other countries...
    http://support.apple.com/kb/HE57

  • HT4623 I need help updated my iphone, please help

    My need help updating my iphone, I went through the steps to update and now it shows connect to itunes, what do I need to do next.?

    Rajan Gupta wrote:
    ...it is continuously showing an error.
    See here  >  http://support.apple.com/kb/TS3424
    Also see this discussion.
    https://discussions.apple.com/message/21189708

  • I have Iconia Tab A500, running 3.0, need help updating using microsd card, got Acer update download

    I have Iconia Tab A500 running 3.0, need help updating, I downloaded all updaes list in the acer supprt, all versions, 3.0, 3.1, 3.2, and 4.something, I read on the acer support somewhere I can use a microsd card to update my device, because acer no longer provides automatically, when i try it says "poor network connection, move to anthoer location.", Do I need to update all the listed updates, or can i only update, using the 4. 0? to get the last known update. I also downloaded, "Documents, Apllications, Drivers, Patches, and O.S..... How do i intsall all these updates, I think am running the very lowest version available, Please Help me... Thank you in advance.

    the update listed on the acer website, that mentions the a500 update is 'kernal source code (for Android 4.0 Ice Cream Sandwich) it's 96.7MB's released 2012/05/08' is that the right one i need? There is also a list of 3 O.S updates, released in 2014/09/05, 391.5MB's, 394.3MB's, and 391.5MB's large, what are those updates, I clicked the model and followed the directions that the acer website asks, and i ended with a list of update released in 2014/09/05, and a Document update released in 2014/12/17, 112.7KB's large,  list of updates reased in 2014/.... and in the Android 4.0 culumn, there is an update that says O.S update released in 2014/09/05, 434.2MB's large, and a Patch Update, that was released in 2013/03/21, what are these updates? listedin the aver website... http://www.acer.ca/ac/en/CA/content/drivers 

  • Need help in creating custom crosstab reports

    Hello
    I need some help in creating custom crosstab reports.
    My current report shows the number of events that have occured over the time in a day
    The events and the eventdetails are read from the database before being printed on the crosstab
    i.e something like this.
    Note : there are no events between 3:00-3:59,5:00-5:59;6:00-6:59,7:00-7:59  (not present in the database)
    hence not displayed in the reports
    *08/07/2009*         01:00        02:00         04:00          08:00          10:00*
    Event X                    1               1                 4                 1                  3
    Event Y                   3               3                 2                 2                  1
    Total                        4                4                 6                 3                  4
    So far so good...
    Now i have to enhance my reporting application to include the event details which have not happened i.e to include the time details in the crosstab reports where no events have happened
    08/07/2009             01:00        02:00         03:00          04:00          05:00         6:00         07:00         8:00     9:00     10:00
    Event X                     1               1                0                 4                  0             4             0                1            0           3
    Event Y                     3               3                0                 2                  0             2             0                2            0           1
    Total                         4                4                0                 6                  0             6             0                3            0           4
    I have fell short of ideas this time around to implement such a thing
    Any help in this direction is deeply appreciated
    Regards
    Srivatsa
    Edited by: Srivatsa HG on Jul 8, 2009 10:56 AM

    Hi,
    It seems that you are having issue with Crystal Report Design.
    Post your question in [Crystal Report Design Forum|SAP Crystal Reports;
    That forum is monitored by qualified technicians and you will get a faster response there. Also, all Design queries remain in one place and thus can be easily searched in one place.
    Regards,
    Shweta

  • Novice needs help: inconsistent recording volume ("flutter")?

    Hello All,
    I'm new to Audition and have been struggling with my recording quality: I'm on a newer dual core Toshiba Qosimio multimedia laptop running Win 7 (64bit) and using a standard desk mic. I read the faq and help files on recording but still remain baffled about this. I'd greatly appreciate some help:
    When recording music in Audition (for example: one strum of a guitar chord), I get a kind of fluttering: I don't hear the whole continous chord's sound. There are subtle 'dropouts' of the sound (like it has inconsistent volume). Now, I'm new at this so I'm probably not using the correct terminology..so I posted a wav file to let you hear:
    http://home.comcast.net/~samiri/director/trash/InconsistentAudio1.wav
    When using this same mic in my older PIV laptop running Win XP, the record quality is fine. Also, when I downloaded Audacity (free audio program) I think I hear the same fluttering..so maybe there is some way I need to set the recording (input) preferences on this machine.
    Thanks for any assistance you can offer.
    [email protected]

    Ah, I had a recent laptop with Connexant Smart Audio, but recently replaced it.
    There is a separate Smart Audio Control Panel that I think is accessible elswhere from the Windows Control Panel. I found it almost totally incomprehensible, but seem to remember that there was a way of switching between two options, one simpler than the other.
    I would also go into the advanced playback settings to see if there are "enhancements" there. Some of these may affect recording.
    As I said before, the only approach with all of this is to find all the various audio contol panels, switch off any effects or enhancements and set all the default sample rates for record and playback to the rate you will be using. Note that the various audio control panels may or may not stay in sync, so it's as well to go round the loop(s) a few times. Do check there is nothing hidden in the "enhancements" area by making sure you scroll down all the options if there are more than just one or two. Note that the Windows audio Control Panel  has to be closed and re-opened before you can trust what it says.
    None of this is the fault of Audition, which just records what is fed to it. It is the fault of Microsoft that there is a broken sample rate converter in Windows 7 and whoever designed the Connexant audio gui does need to be re-educated, I think.
    It would, of course, be very sensible to seek out an external decent usb or similar audio interface.

  • Need help updating OS 10.2.1

    I need to update my system software to 10.2.8. I have dial-up which is extremely slow, so I thought I'd update in parts rather than using the combo update. I had no trouble getting from 10.2.0 to 10.2.1. I've downloaded the 10.2.2 update three times. It seems to be working fine until I open the update icon. It says "The operation could not be completed. An unexpected error occurred (error code 1000)". I can't find anywhere what kind of error this is. I have an old imac. I didn't think that would matter since I'm already in 10.2.1. Any help would be greatly appreciated.

    Hi JEL,
    first of all: WELCOME TO THE DISCUSSIONS!
    The 10.2.8 Combo Update is 97 MB, the sum of all interim updates is more than 136 MB. Furthermore I saw, that the 10.2.5 Update is not online anymore. Use a download utility such as SpeedDownload or iGetter to download the 10.2.8 Combo update. With these you can interrupt, pause and resume any download.
    Also, do not forget to Repair permissions before and after an update!

  • I need help updating the graphic drivers for my laptop.

    Recently purchasd a new game and I am having some issues with the graphics. Every post I have read suggests it is an issue between HP and amd. I keep trying and seem to be going backwards. I would love to actually talk to someone from hp but they haven their number very well. I have tried every combination between hp and amd and I am obviously missing something. I dont have much hair left to pull out.

    Hi there ,  Thank you for visiting the HP Support Forums and Welcome! This is a great site to get answers and ask questions.  I read your post on the HP Support Forums and you had mentioned that you are looking for help Updating the Graphics Drivers on your HP Pavilion dv7t-6c00 CTO Notebook PC.  I have the actual drivers page for your specific HP Pavilion dv7t-6c00 CTO. It has the AMD Graphic Driver on this page. You could also update the drivers a couple other ways.  1. Using the HP Support Assistant2. Going into the Device Manager, Right click on the AMD Graphic and doing an update.  You had also mentioned that you wanted to actually talk to someone from HP. Please use the following link to create yourself a case number, then call and it may help speed up the call process:
    Step 1. Open link: www.hp.com/contacthp/Step 2. Enter Product number or select to auto detect
    Step 3. Scroll down to "Still need help? Complete the form to select your contact options"
    Step 4. Scroll down and click on: HP contact options - click on Get phone number
    Case number and phone number appear.
    They will be happy to assist you immediately. Let me know how everything goes.  Have a great day!

  • NEED HELP IN MATRIX WITH GROUP REPORT

    Dear All,
    I need small help in MATRIX WITH GROUP REPORT In Report Builder Test Report
    In my report, having periods as rows and location as columns as shown below,
    1) LOC-A
    JAN-10 FEB-10
    ITEM-GROUP -1 1 2
    ITEM-GROUP-2 3 4
    ITEM-GROUP 3 5 6
    2) LOC- B
    MAR-10 APR-10
    ITEM-GROUP -1 7 8
    ITEM-GROUP-2 9 10
    ITEM-GROUP-3 11 12
    But comming to my requirement, the periods should be in fix in matrix as shown below
    1) JAN-10 FEB-10 MAR-10 APR-10
    LOC-A
    ITEM-GROUP -1 1 2
    ITEM-GROUP-2 3 4
    ITEM-GROUP 3 5 6
    LOC- B
    ITEM-GROUP -1 0 0 7 8
    ITEM-GROUP-2 0 0 9 10
    ITEM-GROUP-3 0 0 11 12
    I am unable to get this kind of output format
    Please kindly waiting for reply from our team....
    Regards
    krishna.P

    For the periods, create a seperate dummy query and then use it as column group in the multi query matrix.

  • I Need help updating itunes to 11

    I Can't update itunes because i can't. Could you guys please help me with that? Thanks
    Need to update on my windows 7 xp. Thanks

    See the further information area of  Troubleshooting issues with iTunes for Windows updates and the tips on downloading the current version either with a different browser or using the direct links.
    tt2

  • Need help updating an old driv

    I need to update my sound driver for a Dell desktop that's a couple years old. When I tried to check into the correct download I was directed to a page that said there weren't any updates for my driver. I know this is not correct.
    I currently have SB Li've 5. version 5.2..24, and the date on it is 8/30/2002. Creative Labs suggested I should have 5.2..203 and if I didn't that I should follow the support link SBL5DL_DRVPack_LBSBL5DL_PCPatch_LB.exe.
    and then click "Download Now" button.
    When I did that is when I got the "no update" message rather than the correct download.
    I know there must be an update. Could anyone tell me which one I need and where exactly I can find it's Your help would be greatly appreciated.
    Thanks,
    -Jim

    The first step in Upgrading... is to Snow Leopard = OS X 10.6.x
    It is Not available as a download... It is a Paid Upgrade.
    Do this first...
    Check that your Mac meets the System Requirements for Snow Leopard...
    Snow Leopard Tech Specs
    http://support.apple.com/kb/SP575
    If so... Purchase a Snow Leopard Install Disc...
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
    Other countries...
    http://support.apple.com/kb/HE57
    After the Successful Install, run Software Update to get the latest updates for Snow Leopard and iTunes.
    Next... MAVERICKS...
    Check here to see if your Mac is compatible...
    http://www.apple.com/osx/how-to-upgrade/

  • I need help updating LR4 so I can import Nikon Df images. When I try to update, a message says, no new updates. How do I get new updates for LR4?

    I need to update LR4 so I can import Nikon Df images. When I try to update a message says there are no new updates. Please help?

    Adobe - Lightroom : For Macintosh
    Adobe - Lightroom : For Windows
    The latest update for LR 4 is version 4.4.1, you can download the appropriate install package from the links above.
    Unfortunately support for the Nikon Df was only included with LR 5.3, so the options are.
    1. Upgrade to LR 5.
    2. Utilize the free Adobe DNG Converter (the latest version is 8.8) to convert the nef files to DNG format and import the dng files into Lightroon 4. Good idea to retain your original raw files and do appropriate investigation into the uses of the DNG format.

Maybe you are looking for

  • How to set or change the default From Address

    I have a number of email address and when i click on the "Compose a new message" the New messge always comes up showing my gmail address in From line. I have to remember to manually use the popup to select the desired address.  I have looked and cann

  • Why can't I download Tumblr on my iPod 4 anymore??

    I can't download the app anymore! I had to delete the app from my ipod touch gen. 4 in order to make space for an update, so now I'm trying to get it back. But when I attempt to download it, it says that I need iOS 7 or something like that in order t

  • Connect imac 24 " as a second display ?

    can i use imac 24 " as a second display to an other imac??i am having little confused here.. it can be possible on 27" imacs but i am not sure that is possible on 24 " imac..p lease help?

  • Redirect portal users to accept "terms & conditions" ...

    Here is the requirement .. When the users logging in first time i need them redirected to a page to accept "terms and conditions" , next time the page should not be appeared. Only the "terms and conditions" page should be appeared for those who are n

  • Prepopluate adapters getting triggered twice

    Hi, I have configured an access policy for my DB resource and it works fine. However, I see that the pre-populate adapters run twice. One of the pre populate adapter fetches a unique number from the DB each time it runs and since this adapter gets tr