Hi Fellas,
For the past days I’ve been smashing my head against the keyboard while chewing on glass and staring at the abyss of this “code” I’ve came up so far.
Since I can’t figure it out on my own I’m asking you for help.
My Database is a SharePoint Online List.
I’m currently using the 3.22051.27 Version of PowerApps
(european version) (..not sure if this is the correct way to label it. anyway)
Beside a few little differences between US and EU version like “ , “ and “ ; “ there is not much difference in the syntax, If at all.
The SharePoint list has three columns.
Two of them are choice columns allowing multiple selections.
One Column is just a simple Textinputfield (Singleline Text)
I’m using this list as a database (source) for the EditForm in powerapps where the user can make the inputs.
Column1(MultipleChoiceColumn) (drpdwn_Hardware)
Hardware: -Hardware1
-Hardware2
-Hardware1 Accessory
-Hardware2 Accessory
Column2(MultipoleChoiceColumn)
Accessory: -Accessory1
-Accessory2
-Accessory3
Column3(SingleLineText)
-Textinput field
Now what I want to achieve is that based on the choices in Column1.
Column2 and Column3 either are visible or not.
If Hardware1 and or Hardware2 are picked,
Column3 is visible.
Column2 is not visible.
If Hardware1 and or Hardware2, Hardware1Accessory and or Hardware2Accessory are picked,
Column2 and Column3 are visible.
If Hardware1Accessory and or Hardware2Accessory are picked,
Column2 is visible.
Column3 is not visible.
-----------------------------------------------------------------
In the visibility Property of Column3 I’ve entered this code.
(something similar but adjusted for Column2 I wanted to enter in the visibility property of Column2.
Since the formular didn’t work for Column3 I let this one out.)
This is the "code":
If(drpdwn_Hardware.Selected.Value="Hardware1"; true Or If(drpdwn_Hardware.Selected.Value="Hardware1" And drpdwn_Hardware.Selected.Value="Hardware1Accessory"; true Or
If(drpdwn_Hardware.Selected.Value="Hardware2"; true Or
If(drpdwn_Hardware.Selected.Value="Hardware2" And drpdwn_Hardware.Selected.Value="Hardware2Accessory"; true; false ))))))
now the entered formular is correct and is not showing any errors by intellisense but is simply not doing what I think it should do. It refers to the first entry and leaves other input unchecked.
for example if I choose Hardware1 and Hardware1Accessory it turns Column3 invisible…
now at this point I’m stuck.
I tried to use the switch function but can’t wrap my head around it…
Hi @Mars_1 ,
Just for my understanding and make it simple,
1) Column 2 should be visible when Hardware 1 or Hardware 2 is selected in column 1.
2) Column 3 should be visible when Hardware1 Accessory or Hardware2 Accessory is selected in column 1.
3) Both Column2 and 3 should be visible when Hardware 1/Hardware 2 and Hardware1 Accessory/ Hardware2 Accessory is selected in column 1.
For doing multiple selections, let's use combo box instead of dropdown.
In column 2 visible property -> "Hardware 1" in cmbColumn1.SelectedItems.Value Or "Hardware 2" in cmbColumn1.SelectedItems.Value
In Column 3 visible property ->"Hardware1 Accessory" in cmbColumn1.SelectedItems.Value Or "Hardware2 Accessory" in cmbColumn1.SelectedItems.Value
Let me know if my understanding is incorrect, so we can tweak the logic accordingly.
@Ashwin7104 thank you for your response and thank you for the hint with checkboxes. this made me search a bit more in depth. so i came across a video from Reza Dorrani (https://www.youtube.com/watch?v=xUep4uud1BE) which covers what i was looking for and in the blog of Matthew Devaney (Power Apps Multiple Selection Checkbox - Matthew Devaney) i could adjust a few other things. if someone is going to a similar struggle, this might help.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
185 | |
51 | |
47 | |
32 | |
32 |
User | Count |
---|---|
258 | |
89 | |
78 | |
67 | |
67 |