I have a list of reasons for wanting to attend a specific meeting. I'd like people to select their Primary, Secondary and Tertiary reasons for wanting to attend the meeting from a list of about 6 reasons but never be able to duplicate a choice. How would I go about doing this? Right now, I have three drop down boxes (Primary, Secondary, Tertiary) that all pull from the same Table/List of Reasons.
Table/List of Reasons
If I select Reason 4 in my primary dropdown, then I don't want that to show as an option in my secondary or tertiary dropdowns. If I select Reason 1 in my secondary dropdown, then I don't want Reason 4 or Reason 1 to show up in my tertiary dropdown since both of them had been selected in the previous two dropdowns.
Thanks for any help you may be able to offer!
I would probably filter all my dropdowns to show all reasons but the one selected before.
Dropdown1.Items : Filter('List of Reasons',Reason <> Dropdown2.Selected.Value && Reason <> Dropdown3.Selected.Value) Dropdown2.Items : Filter('List of Reasons',Reason <> Dropdown1.Selected.Value && Reason <> Dropdown3.Selected.Value) Dropdown3.Items : Filter('List of Reasons',Reason <> Dropdown1.Selected.Value && Reason <> Dropdown2.Selected.Value)
So, right now my Items reads as follows: Choices('ListOfReasons'.Secondary). Where do I put the "choices"?
Also, thanks so much for your excellent explanation. I never dreamed it "might" be as easy as you proposed since I'm new to this and don't know what I don't know!
The Choices() function returns a table. The Filter() function expects a table.
So you should just be able to substitute your Choices() statement into the Filter. If your column name is "Secondary", then you should be able to modify Theo's ( @tchin-nin ) suggestion to be:
Dropdown1.Items : Filter(Choices('ListOfReasons'.Secondary),Secondary <> Dropdown2.Selected.Value && Secondary <> Dropdown3.Selected.Value) Dropdown2.Items : Filter(Choices('ListOfReasons'.Secondary),Secondary <> Dropdown1.Selected.Value && Secondary <> Dropdown3.Selected.Value) Dropdown3.Items : Filter(Choices('ListOfReasons'.Secondary),Secondary <> Dropdown1.Selected.Value && Secondary <> Dropdown2.Selected.Value)
Thanks so much to both of your for your help. I am still stumped on this and below I'll provide more information. I keep getting the message invalid argument no matter what I do. I tried three or four different things to no avail. I'm sure there is a real learning for me here.
Front end Info
I'm working on the secondary form field as opposed to the first or third.
Trying to follow what came in as the default into my form field (using Meetings)
‘Meetings'.Reason_x002d_Secondary <> ‘Meetings'.Reason_x002d_Primary.Selected.Value
‘Meetings'.Reason_x002d_Secondary <> ‘Meetings'.Reason_x002d_Tertiary.Selected.Value)
Trying to follow exact instructions
Reason_x002d_Secondary <> Reason_x002d_Primary.Selected.Value
Reason_x002d_Secondary <> Reason_x002d_Tertiary.Selected.Value)
Kind of made sense to me based on using selected values from the key card except that does not match the default to the list “Compliance Investigations’. If I tried to use all dcv cards, that did not work at all either.
Reason_x002d_Secondary <> dcvPrimaryReason.Selected.Value
I would think the chances are if you are pulling from a list for your reasons, you are encountering records (rather than a list of just text)... and because of that you can't make comparisons to text without further specificity.
I would put a label on my form to show the ‘Meetings'.Reason_x002d_Secondary piece to me, to make sure I am getting what I expect to get. You might need to add a dot and then reference the specific piece that represents text. Then I'd try to do something similar to get the ‘Meetings'.Reason_x002d_Primary.Selected.Value... which might be more involved as you'd have to set a context variable in the OnChange event, and then point to it.
Based on the error you describe and the location of the "red" error indicators in your code, this is my expectation of what is going wrong, but maybe @tchin-nin can offer another suggestion.
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round
Register by September 5 to save $200