Prevent Identical Selection in Drop Down List in an Expanding Table

Hi All,
I have a 2x2 table in which the top row is a header row and the bottom row 'Row1'. Row1 Cell1 has two buttons in it, one to add a new Row1 using Javascript click instance script:
this.parent.parent.instanceManager.addInstance()
...and one to remove any Row1 using Javascript click instance script:
var rowNum = this.parent.parent.index;
this.parent.parent.instanceManager.removeInstance(rowNum);
Row1 Cell2 contains a datadropdown object.  Basically, when a user adds an extra Row1, I need to prevent them from selecting a previously selected item from the dropdowndata list.  I'm having trouble figuring it out because I'm trying to put together exit instance script (or should it be validate script?) that is trying to reference Row1[*].  In simpler situations where I have two fixed objects, I have just been doing this as a FormCalc exit script:
if (Object1 = Object2)
then xfa.host.messageBox("You can't select the same thing again")
and xfa.host.resetData("Object1")
endif
... which prevents the user from selecting something with the same rawvalue by alerting them, then clearing the field. 
Hope this makes sense and that someone can help!  Thanks in advance to all the adobe gurus out there

Hi,
Would it be possible to filter out the choices in the drop down list that have already been selected.  If so you could try something like this JavaScript in the preOpen event of your drop down.
var dropDownItems = [ "abc", "def", "hij" ];
var rows = Table1.resolveNodes("Row1[*]");
for (var i = 0; i < rows.length; i++)
    var row = rows.item(i);
    if (!row.DropDownList1.isNull)
        dropDownItems = dropDownItems.filter(function(element) { return element !== row.DropDownList1.rawValue});
this.setItems(dropDownItems.join(","));
The first line initialises a variable with all the possible values and then we go though each row filtering out the ones already selected. 
You will probably have to change the form object names to suit you form, but here is my sample to test the code, https://files.acrobat.com/preview/eb0256dc-af30-4f7c-9187-469ba84464a4
Regards
Bruce

Similar Messages

  • Web UI - Value not getting selected from drop down list  .

    Hi  All ,
        I am facing a problem in one of the fields which is enhanced with a drop down functionality .
      I have created the GET_V_** method and also the GET_P_**  method for the same .And finally I am able to see the values in the drop down list . But the problem is , when I am trying to select a value from the drop down no values are selected .
    Can anyone plese help me in this as What has to be  done .
    I have taken references from few guides but I am not getting any clear idea of what has to be done .
    Regards,
    Ranjita

    Hi Ranjita,
                     To trigger a round trip, you must have given the event name in GET_P method.
    Same event handler would trigger.
      Please put a break point in Event Handler in IMPL class, and in SET_attr method of the attribute in CN class and see if value is getting set properly or not. Final value that would be displayed on UI would be there in GET_attr method of CN class.
      I hope it helps.
    Thanks,
    Rohit

  • How can I select from drop-down list and jumping to selected subform?

    I using LC Designer ES2 vers 9. Developing XDP. How can I Select from a drop-down list the appropriate selected subform (jumping to the selected subform on the page)?
    drop-down list...A (jump to subform1)
                             B (jump to subform2)
                             C (jump to subform3)
    subform1
    subform2
    subform3
    ....end of form

    Hi,
    you cannot set focus on a subform but on a field, as only interactive objects can be focussed.
    From a dropdowns exit event the script will look this way:
    switch (this.rawValue) {
              case "A" : xfa.host.setFocus("form1.page2.field1"); break;
              case "B" : xfa.host.setFocus("form1.page2.field1"); break;

  • Displaying user selection from drop down list in static text on master page

    Hello,
    I am using LC 7.0 at workk and I have hit a road block.
    I have a drop down list at the top of the form. Once the user makes a selection, I want to take that value and paste it in static text located on the master page. I can't seem to get it to work.
    Please help!!!

    Hi,
    Place the Drop Down list on form
    Place text object(s) on master page
    here is the script to display the value and/or text of drop down
    Script will be on Drop Down list events
    Calculate event to display value of DD - FormCalc
    form1.pageSet.Page1.StaticText1.rawValue = this.rawValue;
    Change event to display Text of DD - JavaScript
    form1.pageSet.Page1.StaticText2.rawValue = xfa.event.newText;
    SAVE the form as dynamic pdf.
    Hope this will help.
    Thanks,
    Raghu.

  • Not able to select in drop down list

    We have an on line database for our school. I can move around in it fine but when I try to select an item from a drop down list nothing happens.
    Any thoughts?

    There are a couple things you can try:
    1. Go to Settings > Safari > Advanced > Debug Console and turn it ON.  Return to Safari and reload the web page.  Tap the Debug Console banner to see any issues when loading the web site.  Then try tapping the drop-down list (select element).  Do any new issues appear in the Debug Console?
    Don't be alarmed if there are a lot of items listed in the Debug Console.  Most of the time they're harmless.  You're looking for a JavaScript error message (as opposed to CSS or HTML) that might give a clue as to why the page doesn't work.  Is there is a JavaScript message that corresponds to the broken drop-down list?
    2. Launch OS X Safari.  Open Preferences (Cmd-,).  Click on Advanced tab.  Check the "Show Develop menu in menu bar" checkbox.  Open a new browser window (using Cmd-N).  With the new browser window focused, select Develop > User Agent > Safari iOS 5.0.1 – iPad.  (You can check that the setting is correct by loading http://www.whatsmyuseragent.com/ and comparing it to the real iPad.)  Then navigate to the same page with the inactive drop-down list.  Does the same issue occur as on the iPad, or does the drop-down work?

  • Making multiple selections in drop down lists

    How do I configure drop down lists to allow for multiple selections?

    Hi,
    I am wondering how to best design the list box to allow for multiple selection? I have 4 items i need to have in the box but how do i best communicate it to the end user that they can select more than one or need to select more than one option and how they do that?
    Thanks.

  • Refresh the drop down list after update the table

    I have tab with three pages in each page one data block. I have table with primary key of combination of the other tables foreign key. I am populating the combination of foreign key in dorp down list. In the when-new-form-instance trigger I populate the two lists, work fine. But if I add a new record in the other tables and I need this one to display in the list. I am trying to execute the same procedure which is populate the list
    First time I get this error. FRM-41337. How can refresh the list to display the new record as well.
    Thanks in advance
    null

    Hellow Tamer
    What you wanna do is to display the element entered in the List after you have added it manualy.
    I think you must re-populate the Recordgroup
    again.
    The Procedure you used to populate the RecordGroup in the When-new-Form-Instance,
    must include the statement:
    DELETE_GROUP()
    like This:
    PROCEDURE Populate_The_List(list_id ITEM, sql_stat VARCHAR2) IS
    group_id RecordGroup;
    outcome NUMBER;
    BEGIN
    --Create temporary record group.
    group_id := CREATE_GROUP_FROM_QUERY('List_Elements', sql_stat);
    IF ID_NULL(group_id) THEN
    MESSAGE('Record Group could not be created in Populate_the_List.');
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    --Populate record group.
    outcome := POPULATE_GROUP(group_id);
    IF outcome <> 0 THEN
    MESSAGE('Record Group could not be populated in Populate_the_List.');
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    --Populate list item
    POPULATE_LIST(list_id, group_id);
    --Destroy the temporary record group to release resources
    DELETE_GROUP(group_id);
    EXCEPTION
    WHEN OTHERS THEN
    MESSAGE('Internal error occurred in Populate_the_List.');
    RAISE FORM_TRIGGER_FAILURE;
    END Populate_the_List;
    SQL_STAT refers to the SQL statement used further to populate the List.
    Hope this Helps
    Regards
    Tariq

  • How can i set the values to text box by selecting from drop down list.

    hi ,
    i am using struts and jsps. i have a dropdown list of names(getting the values of names from database), i want to get address and phone number of that selected one.how can i get that?

    Hi swarupa,
    Well My advice in this senario wud Be
    Either U can make Use of XmlHttp Object through javascript(AJAX way).
    Or U need to Maintain the State of the entire form and then refresh the page to get those results....
    just for U r reference i am attaching a link which was programmed using ASP @ server side and which made use of XmlHttp Object.....
    http://www.w3schools.com/ajax/ajax_database.asp
    Just try to simulate the samething in your own way....
    REGARDS,
    RAHUL

  • Select Expert Drop down list

    Post Author: MarcS
    CA Forum: General
    Hi,
    I'm using Crystal Report 11. I'm creating a parameter field that will allow me to select a specific data from one field in my database.  When I use the "Select Expert" it only show me the first 500 records.  How can I see the rest of the data?

    Post Author: SKodidine
    CA Forum: General
    There is a time limit of 5 seconds by default.  All values fetched within 5 seconds will be displayed.  If you want to increase the time limit or the number of records fetched then you will have to modify the registry keys as described in this KBase article.
    http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2001119&sliceId=&dialogID=5902806&stateId=1%200%205904330
    Replace the registry key path in the article with HKEY_CURRENT_USER\Software\Business Objects\DatabaseServer

  • How can I get a drop-down list selection also be selected in another field with the same list but a different name?

    I have a street address and a billing address. A question is posed with a checkbox — "Is the billing address the same as the street address?" If Yes is checked, the street address automatically fills the billing fields. If No is checked, the user must fill in new information. In both the street address and billing addres, the State field is a drop-down list. How can I get the drop-down list selection in the street address State also be selected in drop-down list for the billing address State?

    Has anyone done this?

  • How to show first parameter value in drop down list as a default value dynamically in ssrs report?

    Hi,
    in my ssrs report i have two parameters, accounts and Manager ,there is a cascading between the accounts parameter and manager parameter, as per the cascading we will get managers names based on the account we selected in the accounts parameter,
    my requirement is the first name in the mangers drop down list  has to get selected as default value.
    please help me with this, it is an urgent requirement.
    Thanks in advance,
    Naveen

    Hi NaveenMSBI,
    According to your description, you want to use cascading parameters in the report, if the accounts are selected when you preview the report, the first manager name will be selected from drop down list as the default value. If so, there can be two scenarios:
    • If manager is single-valued parameter, we can get Available Values and Default Values from the same query as below. Then when the accounts are selected, the first manager name will be selected as default value.
    SELECT managerName FROM table_name WHERE accounts IN (@accounts)
    • If manager is multi-valued parameter, we need to use different query for Available Values and Default Values. In this case, please refer to Patrick’s solution.
    For more information about Adding Cascading Parameters, please refer to the following document:
    http://technet.microsoft.com/en-us/library/aa337498(v=sql.105).aspx
    If you have any questions, please feel free to let me know.
    Best Regards,
    Wendy Fu

  • Fill Drop down list in Interactive form

    Hello.
    I am trying to display multiple values form the context of an form, so not web dynpro! I am using a valuelist object for that.
    When I test the form I am only getting to see the first value of my internal table and the drop down list cannot be expanded.
    If I analyse the XML I see that the items are there which I want to display.
    What is the cause of this, or is this only possible with Interactive form in an Web dynpro scenario (I hope not)
    Regards,
    Harrie Prinsen

    Hi Harrie,
    As per this post, I understand that you are going to use a simple ADOBE PRINT FORM which fetches data from ECC and displays it in the form...Am I right?
    See, if it is going to be a Simple PRINT FORM which is NON-INTERACTIVE in nature, I dont see the need of DROP DOWN LIST in this scenario. I think that could be the reason why always the first item of the INTERNAL TABLE is displayed all the time.
    If you have an INTERACTIVE SCENARIO where the user can select an option from the drop-down, then you can go with ABAP WD/JAVA WD/ISR Adobe Interactive Forms.
    Regards,
    <i><b>Raja Sekhar</b></i>

  • How to add a dynamic drop down list in RDLC reports in WPF

    I have to Load an RDLC report in WPF application and need to include a drop down list in report.Based on the selection of drop down list different reports to be generated.I am using C# and WPF.
    Eg: I have to list the details of employees in in RDLC report.There is a country drop down list, Based on the selection of country drop down list we need to display details of employees in the selected country.

    Looking good.
    With rdlc I think you will have to use the windows report viewer control.
    If this was SAP crystal reports there's a wpf report viewer.
    I never actually tried that with rdlc and I suppose there is a small chance they turn out to be compatible.  
    If you have questions on rdlc specifically then you're probably better finding a forum specialises in that. Not sure where that would be but maybe in the sql server forums.  It's a business intelligence thing and people who do the likes of ssis are
    what you want really.
    I do reporting myself but I think you'll find few others who do so here.
    Good luck.
    Hope that helps.
    Recent Technet articles:
    Property List Editing;  
    Dynamic XAML

  • Its urgent please help me( Drop Down list box)

    Hi i am writing th eBDC for VA32 t-code in that screen it is having the dropdown box for the line items i want to select the drop down list in that screen through BDC how we can do this?
    Thanks in advance

    yes but when we are transfering that value it is not accepting
    0     Assigned by the System (Internal)
    1              Delivery date too late
    2     Poor quality
    3              Too expensive
    4     Competitor better
    5     Guarantee
    10            Unreasonable request
    11     Cust.to receive replacement
    50     Transaction is being checked
    the thing is in the drop downbox these text values are coming
    but how can i?

  • Binding Drop Down Lists

    Hello,
    I am trying to figure out how i can bind drop down lists. I want it so if you choose a certain selection in drop down list 1, then you are only able to pick a certain selection out of drop down 2. So basically each selection in drop down 1 will give you different options to select in drop down 2. Sorry if i made that really confusing. Thanks
    -Aaron-

    Hi,
    Here is a mock-up version of the spreadsheet.
    The first dropdown has the nine categories set in the Object / Field tab. Also have a look in the Object / Binding tab as there are values specified for each of the nine categories. These will be used later in the script.
    The second dropdown does not have any values specified in the Object / Field tab.
    Instead there is script in the exit event of the first dropdown. This is a switch statement that first of all looks at the bound value ("9030") of the choice that the user has made ("9030 National Marketing"). The statement then looks at each case until it gets to one that matches; then it runs the script for that case and then breaks from the switch statement.
    Each case starts off with:
    DropDownList2.clearItems();
    DropDownList2.rawValue = null;
    This is important because this clears the list in dropdown2 and sets its value to null. These two lines are then followed by a series of addItem() script which goes through all of the types in that category.
    I have scripted all of 9030 and the first five lines of 9031. This should get you out of the traps. It is a bit of a pain, but just copy and paste downwards.
    Each case ends with a "break;" and the last "}" closes the switch statement.
    Good luck,
    Niall

Maybe you are looking for

  • Problems with Games Center after latest update

    Dear All I have never used, or wanted to use, the 'Games Center' pre-installed on my iPhone. After the recent software update I now find that all my games have shifted themselves into this utility such that everything greets me with 'welcome back....

  • Issue in sending mails from Apex -Please help

    Getting following error while processing the statment. ORA-01403: no data found Statement processed. create or replace procedure proc_bgv_email_accept as id_email number; l_startdate date; l_vacancy varchar2 (300); l_declinedate date; l_emailsenddate

  • Tables not showing up

    i've oracle 10 g installed in my comp on windows.... till now it was working fine.... but now... when i start database n try to access tables through home - > object browser - > show tables ..... it's not showing any tables or home - > sql -> sql com

  • Xslt does not output XML declaration

    Hi there! I have been trying for days to transform an XML doc into another one using an XSL stylesheet (that contains a <xsl:output method=xml/> tag...). different methods: -using xmltransform(xmltype(xmldoc), xmltype(xsldoc)) I get a xml fragment, w

  • Goods Issue Output

    Hello Experts! For a new Sales Org, I cannot get the system to print the GI Output. The process works fine automatically for our others Sales Orgs/Plants. We are not using a standard Output condition Type (I dont think - YBL3?) I can re-print the doc