Validation also needs to know if row is checked.

I have a tabular form. It displays a list of product names, and there is a flag as to whether the name is primary or not. Each chemical needs to have exactly one primary name. So I want a validation that will give an error if the user tries to delete the last primary name. So basically I need to count the primary names, and subtract the ones that are checked when the user clicks the delete button. I thought that the following might work, but it goes off even if the user tries to delete a non-primary name.
declare primaryNames number;
begin
primaryNames := 0;
for i in 1.. htmldb_application.G_F05.COUNT loop
     if htmldb_application.G_F05(i) = 1 then
          primaryNames := primaryNames + 1;
     end if;
END LOOP;
for i in 1.. htmldb_application.G_F01.COUNT loop
     if htmldb_application.G_F05(i) = 1 then
          primaryNames := primaryNames - 1;
     end if;
END LOOP;
if  primaryNames < 1 then
     return 'Need at least one primary name.';
end if;
return null;
end;Any suggestions?
3.2

Okay, I got it now. declare primaryNames number;
     v_rowno number;
begin
primaryNames := 0;
for i in 1.. htmldb_application.G_F05.COUNT loop
     if htmldb_application.G_F05(i) = 1 then
          primaryNames := primaryNames + 1;
     end if;
END LOOP;
for i in 1.. htmldb_application.G_F01.COUNT loop
     v_rowno := a;ex_application.g_f01(i);
     if htmldb_application.G_F05(v_rowno) = 1 then
          primaryNames := primaryNames - 1;
     end if;
END LOOP;
if  primaryNames < 1 then
     return 'Need at least one primary name.';
end if;
return null;
end;With help from http://stackoverflow.com/questions/9367759/apex-tabular-form-with-row-selector-how-to-set-value-of-column-in-selected-ro

Similar Messages

  • HT1933 I have been charged for downloading Indira Budiman from itunes multiple times, how to report to itunes?  Is anybody else also having problems like this? And also need to know how to block them from charging again?

    I have been charged for downloading Indira Budiman from itunes multiple times, how to report to itunes?  Is anybody else also having problems like this? And also need to know how to block them from charging again?

    I don't know who/what Indira Budiman is, but you can contact iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    If it's an app then does it allow you to make in-app purchases within it ? If it does then you can turn off in-app purchases via Settings > General > Restrictions on your device.

  • I am new to this I Pad Air and was downloading some games and it is still in waiting mode with the circle continually going in circles. I need to delete these and do not see how to do this. also need to know where I go to delete history

    I am new to this I Pad Air and was downloading games and is still showing in waiting mode with the circle continually going Arian. I want to delete but unable to figure ot how. also needing to delete history, need a lot of help

    Hey Carolyn1951,
    Thanks for the question. I understand you have a few apps that only display "Waiting". The following is a past discussion that dealt with a similar issue, the answer may help you as well:
    App updates won't download on my...: Apple Support Communities
    https://discussions.apple.com/thread/4111336
    Try tapping the App, so that it changes to Paused instead of Waiting, then tap it again to resume the install.
    Make sure you don't have any paused downloads in other apps either, like the App Store or iTunes Store.
    If that doesn't do it, try resetting or restoring the iPhone.
    via whatheck
    Thanks,
    Matt M.

  • I am new to using flash and need to know how to add check boxes and forms

    I have been going mad trying to figure this out as well as searching until exhaustion.
    So I am hoping someone can point me in the right direction.
    Okay here is what I am trying to accomplish.
    I have laid out my design as a psd and brought it into adobe flash pro cs5.
    I have menu items such as toppings that I want to put check boxes next to each and then once someone goes thru the page and places their choices,I want to be either be emailed what they have chosen from the form... This seems like it might be the easier of the ways to capture data, Or if there is a better way in flash to capture this data, I would take that as well.
    SO here is as far as I can get.
    Imported the psd and added one checkbox in front of the first item and labeled it strawberries. Now I really don't want the word strawberries to show up at all on the page,just the checkbox. But I am not sure if the label for the checkbox actually passes on the value of the checkbox.
    I admit I am lost.
    I did also slice and export this same image into dreamweaver and then I made a separate apDiv for each checkbox, and added into a form. It emails the results,but it is not outputting it in a very readable way.
    Oh I also brought this int Flash Catalyst and added the checkboxes, but I don't know where to go from there.
    So if anyone can let me know the proper way to do this or point me to some videos or tutorials or even a sample file that I can alter....
    I would really appreciate it.
    Thanks

    http://www.flashloaded.com/userguides/ezform/formelements.html

  • Can I set up a 2 (or 3) room audio system? I have iphone 3, iphone 4 and ipad 2 and need to know what hardware, if any, I need for this (airport express?, apple TV?) Also, would I use icloud or home sharing?

    I need to know what hardware, if any, I need to do this (airport express?, apple TV?)
    I simply want to send music from my itunes to 2 different rooms at the same time. Is it possible? I have iphone3, iphone4 and ipad2 if that helps.
    Also, would I use icloud or home sharing? Sorry for the noob question, any help is appreciated.
    Thanks!

    The answer is not if you use iTunes.
    The TC is NOT an iTunes server.. it is not a media device at all. It is a backup location for Time Machine.
    You need a computer in the network which stores the iTunes library and you can then play it via the ipad.
    A mini with a large USB drive plugged in will work fine.. it doesn't need to be new.. a couple of years old mini will work just as well.
    As an extention to this, can we use multiple Airport expresses plugged into mutiple sound systems to simultaneously access different music from the same time capsule?
    I am not sure.. there will be network limitations to this.
    Look up how to use itunes in a network.
    http://support.apple.com/kb/ht4620
    You would do better perhaps posting the question in iTunes section.. if as I guess you are actually using iTunes.

  • My daughter put in a restriction code on her ipod touch and I need to know how to reset her device as a new one and I also do not have her itunes account information?

    My daughter put a restriction code on her ipod touch and i also cannot get onto her itunes account.  I need to know how to reset her device as a new device?

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Take your time... Pay particular attention to Steps 3 and 4.

  • Iphone 3gs software update version 6.1.6 not able to do it need help and also want to know if i do not update it will my phone stop working

    Hi I am getting a message of updating my iphone 3gs software version ios 6.1.6 but i am not getting an option to download it how can i update this version on my phone and if i will not update it will my phone stop working i am confused as i tried a lot online to search and download for it but not find it and now want rectification of it and also want to know if i do not update it what will happen next. please a little help required in this if its possible please reply on this as i am in need of this phone and do not want it that it should stop working just bcoz of it

    manubakshi26 wrote:
    Hi I am getting a message of updating my iphone 3gs software version ios 6.1.6 but i am not getting an option to download it how can i update this version
    Do the Update using iTunes on your Computer.
    See the Using iTunes Section Here...
    How to update your iPhone, iPad, or iPod touch
    Make sure you have the Latest Version of iTunes (v11.1.5) Installed on your computer
    iTunes free download from www.itunes.com/download

  • HT201376 How do I go about unlocking a recovery HD? Also I need to know what disk image should I use when trying to restore a failed(erased) disk in DU?

    Also I need to know what disk image should I use when trying to restore a failed(erased) disk in DU?

    You need to plug it into your computer running iTunes and restore it. Have you tried that? If so, what happened?

  • I just ordered a macbook air today and need to know if the 128gb SSD is enough space. I presently have a macbook pro and am using only 30gb hard drive space so, the apple rep said 128 is enough as I do not load much pictures or gaming etc. Also is i5 ok.

    I just ordered a macbook air today and need to know if the 128gb SSD is enough space. I presently have a macbook pro and am using only 30gb hard drive space so, the apple rep said 128 is enough as I do not load much pictures or gaming etc. Also is i5 ok.

    Id choose the I5 yes, depends on what your usage is going to be,
    ....your question about "128 gig being enough" begs the question for IDEALIZED USE of your macbook AIr
    In the case of a Macbook Air with ‘limited’ storage on the SSD, this distinction becomes more important in that in an ever rapidly increasing file-size world, you keep vital large media files, pics, video, PDF collections, music off your SSD and archived on external storage, for sake of the necessary room for your system to have free space to operate, store future applications and general workspace.  You should never be put in the position of considering “deleting things” on your macbook SSD in order to ‘make space’.
    *Generally, unless you NEED the data at least once every few weeks or once a month,...it really does'nt NEED to be on the SSD of your Macbook Air.
    Professionals who create and import very large amounts of data have almost no change in the available space on their computers internal HD because they are constantly archiving data to arrays of external or networked HD.
    Or in the case of the consumer this means you keep folders for large imported or created data and you ritually offload and archive this data for safekeeping, not only to safeguard the data in case your macbook has a HD crash, or gets stolen, but importantly in keeping the ‘breathing room’ open for your computer to operate, expand, create files, add applications, for your APPS to create temp files, and for general operation.
    Ive got more APPS than any human should have on my 128gig AIR,..(50 or so),....and 10gig of working data, important files etc etc.
    Still have 82gig available....... the entire point is that someone shouldnt consider the Air a "storage device" for tons of pics, music, vids, etc.
    *Never consider any computer a data storage device at any time under any circumstance, rather a data creation, sending, and manipulation device. Anyone who thinks data is safe on any computer, even copied upon multiple partitions is making a mistake that will, without fail, strike.
    For needs of packing around a LOT of "big data" with your Air in its case..., get a nice 1TB HD for $70, or even a 2TB drive not much bigger.
    Perfect 2TB HD, very slim, the "little giant"   made by Toshiba (have several of these) $119
    http://www.amazon.com/Toshiba-Canvio-Connect-Portable-HDTC720XK3C1/dp/B00CGUMS48 /ref=sr_1_4?s=electronics&ie=UTF8&qid=1379182740&sr=1-4&keywords=2tb+toshiba
    *This one is the BEST  external HD available that money can buy:
    $75
    HGST Touro Mobile 1TB USB 3.0 External Hard Drive
    http://www.amazon.com/HGST-Touro-Mobile-External-HTOLMX3NA10001ABB/dp/B0062FZ2WS /ref=sr_1_1?s=electronics&ie=UTF8&qid=1379185002&sr=1-1&keywords=hitachi+extern a l+hard+drive

  • Please help...I was downloading my pics from the SD card. I then I highlighted 5 pics and selected erase, once I selected erase 20 other pics was also erase. I need to know how can those erase pics be recovered? Please Help!

    Please help...I was downloading my pics from the SD card. I then I highlighted 5 pics and selected erase, once I selected erase 20 other pics was also erase. I need to know how can those erase pics be recovered? Please Help!

    You will need data recovery software. See this post:
                                                                                       Re: I accidentally lost 3 weeks of photos, how do I recover them?                                            
    And please send feedback to Apple: This is a bug. Only the imported photos should have been deleted, not all photos on the card. You can use this form: Apple - iPhoto - Feedback

  • My I pad 1 sometimes while watching working switches off and go back to home page ... Why ? Also I need to know how I can upload my photos and pictures from laptop to my I pad.  I tried thru I tunes but not work.

    My I pad 1 sometimes while watching working switches off and go back to home page ... Why ? Also I need to know how I can upload my photos and pictures from laptop to my I pad.  I tried thru I tunes but not work.

    Satmar wrote:
    My I pad 1 sometimes while watching working switches off and go back to home page ...
    Try This...
    Close All Open Apps... Sign Out of your Account... Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    Wait for the Apple logo to Appear...
    Usually takes about 15 - 20 Seconds... ( But can take Longer...)
    Release the Buttons...
    Note:
    Also consider Deleting any Apps you have Purchased / Downloaded but you now never use...
    Satmar wrote:
    Also I need to know how I can upload my photos and pictures from laptop to my I pad.
    See Syncing photos to devices
    Here  >  http://support.apple.com/kb/HT4236

  • I have an Ipad I purchased in March 2012. I also have an I-Phone 5 and an Ipod. We are going to France and I know their power outlets are 220 instead of 110. I see I can get an adapter plug but do I also need to get a reducer to go from 220 to 110?

    I have an I-Pad I purchased in March 2012. i also have an I-Phone 5 and an I-Pod. We are traveling to France and I would like to know how to charge my equipment their. I understand they have different plugs and run 220 vs 110. I see converter plugs but they don't reduce the voltage. Do I also need to reduce the voltage?

    All Apple chargers work from 100-240VAC, 50-60Hz power. All you will need is a plug adapter for the country you are in.
    FYI - You can use the iPad charger to charge your iPhone.
     Cheers, Tom 

  • I am trying to talking with someone in Brazil but the conversation by web is outline and by phone also. I need to know the status of the case 0214422333.

    I ordered a product for teacher twice by error, of course because there is  no reason to pay for the some product in the same time.
    I need to know how to cancel one of them.
    I am trying to talk with someone since last week.
    Adobe Creative Cloud

    Cancel http://helpx.adobe.com/x-productkb/policy-pricing/return-cancel-or-change-order.html
    -or by telephone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

  • How to know which row is newly created in the table

    Hi all
    i have one classic table with a button to add new row.
    when page renders initially it displays some record .Here user can either update the previously existing record or may create new ones .
    after adding one more row when users submits it , in back-end i need to go thru all the rows in the view to do some validations .but i need to insert newly created row using API. how can i know which row haas been newly created,
    pls help

    you can know which row is new using different techniques at different places, depending where you want to do it.
    1. In AMImpl: if the PK column attribute of the row does not have a value, then you know this is a new row.
    2. In EOImpl: insertRow will be executed only if it is a new row.
    3. In Pl/SLQ package (if being called from EOImpl): You can check the creation_date or OVN for the row and determine if this is a new row.
    4. You can use the method mentioned in this thread
    Row Status Question
    Thanks
    Tapash

  • HT4993 hello i would like to ask .. how much need to know mobile phone's code? thank you

    i would like to ask .. how much need to know mobile phone's code? thank you

    Did you already try the suggestions from this article?
    Symptoms
    In certain situations, iPhone may present one of the following symptoms:
    "Invalid SIM" or "No SIM Card installed" alert appears intermittently.
    Status bar displays "No Service", "No SIM" or "Searching" in a location with good network coverage.
    Resolution
    If you encounter any of the above symptoms on your iPhone, try these steps to attempt to resolve the issue:
    Update your iPhone to the latest version of iOS.
    Toggle Airplane mode On and Off.
    Try turning iPhone off and then on again.
    Check for a carrier settings update. Tap Settings > General > About. If an update is available, a prompt will appear.
    Remove the SIM Card and verify that it is a valid, carrier-manufactured SIM. Also verify that it is not damaged, worn, or modified. Then reinsert it.
    Restore the iPhone.
    copied from iPhone: Troubleshooting No Service or No SIM

Maybe you are looking for

  • Using a different apple ID for apps

    I have a really tricky question - Somehow I managed to use an old Apple ID to purchase apps, but then forgot the password for that ID.  The email address I used to sign up is now no longer valid. And for some reason my date of birth information is in

  • Older Model iPod Shuffle is not recognized on my computer or in iTunes

    I had an old iPod shuffle that was a gift -- I'd never opened it. A friend hooked it up to her computer and put some songs on it. I was thrilled to finally be able to use it, but wasn't happy with the song selection. So I downloaded iTunes and loaded

  • Short commnds for page up and down

    Hi, very basic question but in a pc keyboard you have the Home button to press and it automatically goes to the top of the page, safari or document, does anyone know this or something similar on the mac keyboard?

  • How to resolve the datasource with Cloudspace database?

    Hi, I am running WebLogic 6.1 on Win2k and I have problem with Cloudscape database in Default Admin Server. === Start init method in myJDBCReadServlet.java === Init Error: javax.naming.NameNotFoundException: Unable to resolve MyJDBCDataSource. Resolv

  • Parameter 1 not being set

    Hi everyone, I'm trying to delete a row from a data table and although I'm using a simple piece of code which works elsewhere I'm getting a parameter1 not set error. The problem is with cursorFirst() but I haven't got an idea why... Anyone got a sugg