Drop-Down List Box Hide existent item in list - InfoPath Dev
in

InfoPath Dev

Drop-Down List Box Hide existent item in list

Last post 09-02-2017 06:44 PM by Abeyenen7. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 12-30-2011 10:58 PM

    Drop-Down List Box Hide existent item in list

    I have drop-down list box control in a custom list form, it binds to a another list(Secondary date source). For example: Drop-Down List Box A: Apple, Banana, Orange, Strawberry; What I want to do is: If there is a list item which has selected "Apple" in drop-down list box A, when user create a new list item he will not see "Apple" in the drop-down list box A. What rules should I apply? Thanks.
  • 01-01-2012 10:22 PM In reply to

    Re: Drop-Down List Box Hide existent item in list

    Hi William.Ru,

    I seem to recall that we developed a clever sample for this in the past but now I can't find it. Filtering doesn't work here because you need to compare against previously selected items. You could write code to do some kind of IsMember check but there is a simpler way. Basically, you just need to set "selected" boolean or checkbox value that is at the same level as the items in the secondary data source. Just have it bring down another column and set this to "GOTCHA" or whatever when they pick it. Then, add a filter that compares against this second column and only chooses the sibling fruit where the new column is not equal to GOTCHA. Something like that ought to do the trick. There should be a download somewhere on this site for that. Maybe search for "unique dropdown" ...

    Best of luck,

    PS> to set the new sibling column to GOTCHA when the fruit is selected, you have to add a filter on the set which isn't supported out of the box (qRules SetValue will do). So another idea which may not even require the new column is to try adding a filter to the dropdown you add a condition where you look up in the table the value of the current node and checks whether it exists. Might involve a tricky xpath that checks for the size of the substring returned or something like that since existence is not an xpath function.

    Patrick Halstead
    Project Manager at Qdabra
  • 01-03-2012 04:58 PM In reply to

    Re: Drop-Down List Box Hide existent item in list

    Hi Patrick Halstead, Thanks for your so kindly reply my question in detail. I will try to one more column to filter the secondary data source. Thank you.
  • 08-28-2017 08:08 AM In reply to

    Re: Drop-Down List Box Hide existent item in list

    Please, can you do walk throw?
  • 09-02-2017 06:44 PM In reply to

    Re: Drop-Down List Box Hide existent item in list

    HI William, Did the solution worked for you. Please provide support am currently facing the same issue.
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.