HIDE SELECTED ITEM ON DROPDOWN

HIDE SELECTED ITEM ON DROPDOWN

  

Good Day,


I have here 3 dropdown (see image 1) with the following list (see image 2) All dropdown has the same items in it, what I want to accomplish is that when I select an item I want it to hide from the menu.


Thanks in advance :)




Hello Michael.

It will be easier to just allow the user to select duplicate questions, and then when they click the Save Changes you validate the form and check for duplicates. If you find duplicates, then just give a feedback error message, and allow the user to change the questions.

I bet this is not a highly used form on your application, so optimizing it is not worth the effort. And this solution I'm proposing is very easy to implement.

Hi Leonardo,


Yes we can your suggestion, but the requirements is to hide the selected items. :)

someone can help regarding this.


Thanks

Solution

Hello Michael. If you must, then I recommend you do the following:

1. Create a function called GetQuestionsWithoutDuplicates. This will return the list of questions that will be displayed on the dropdown. It should have two QuestionId inputs, and a List of Question output.

2. On the GetQuestionsWithoutDuplicates, fetch the list of questions, and filter the ones that are different than the two QuestionId received as input. You can use the ListFilter for that.

3. Use a call to this function in the Source Record List of the dropdowns. For dropdown 1, use the values of the dropdown 2 and 3 as input parameters to the function. For dropdown 2, use the values of dropdowns 1 and 3. For dropdown 3, use dropdown 1 and 2 as input.

4. Set the OnChange event of the dropdowns to refresh the other drop downs.

Solution

Hi Leonardo,


Got It!


Thanks