Hello All,
I am trying to limit the values of a multiselect combobox based on the selection of the same combobox:
Users should be able to select either 'Not Applicable' OR a combination of Option 1 to 3. It should not be possible to select for example Not Applicable + Option 2.
I have tried to user the "On Update" property as follows to at least colorcode the border if they select something wrong, but even this does not work:
If(First(DataCardValue13.SelectedItems).Value = "Not Applicable" || CountA(DataCardValue13.SelectedItems.Value) > 1 ,DataCardValue13.BorderColor = Red)
Options which I thought of: Reset the field if Not Applicable + something else would be selected or make the combobox single select in case Not Applicable would be selected.
Does anyone have a good idea?
Thanks in advance.
Solved! Go to Solution.
Hi All,
found the solution:
While for @rubin_boer apparently the following worked well:
SelectMultiple = Not("Not Applicable" in Self.SelectedItems)
For me it had to be as follow:
SelectMultiple = Not("Not Applicable" in Self.Selected.Value)
Issue is closed.
Thank you @rubin_boer for pointing me to the right direction.
BR Jan
hi @Jan_
set the comobox's SelectMultiple = Not("Not Applicable" in Self.SelectedItems)
Hope this helps,
R
Hi @rubin_boer ,
Thanks a lot for your quick response and for providing a solution.
It looks logical and seems to work as intended in your example but when I include the code in my PowerApp, it seems to not have any effect.
I have tried copying the exact text of the choice from the SharePoint list column configuration to ensure no spelling errors but it does not work - i am still able to select all options together.
Do you have any idea what else I can verify to achieve the same like you?
BR Jan
Hi All,
found the solution:
While for @rubin_boer apparently the following worked well:
SelectMultiple = Not("Not Applicable" in Self.SelectedItems)
For me it had to be as follow:
SelectMultiple = Not("Not Applicable" in Self.Selected.Value)
Issue is closed.
Thank you @rubin_boer for pointing me to the right direction.
BR Jan
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
255 | |
122 | |
85 | |
75 | |
72 |