I have a gallery that is displaying a schedule. The schedule changes each month. It references data from an excel file (temporarily). I want to be able to control which table the gallery is displaying using an IF statement in the Items menu. I cannot seem to get it to work with multiple values for the IF statement. This is the current code, but it returns an error: If( Dropdown4_3.SelectedText.Value="July", July [, Dropdown4_3.SelectedText.Value = "August", August])
Is my syntax wrong or is this just not something possible inside a Gallery?
Solved! Go to Solution.
Using different datasources in an Items property is generally a bad thing to do. It only works if the datasources have the exact same schema. If not, then you will need to shape the data for each one in order to produce a standardized/common schema to the gallery control.
Also, you are using the SelectedText property which is deprecated. You should avoid that and use just the Selected property.
Your formula is incorrect and should then become the following using a Switch function rather than an If:
Switch(Dropdown4_3.Selected.Value,
"July", July,
"August", August
)
I hope this is helpful for you.
Using different datasources in an Items property is generally a bad thing to do. It only works if the datasources have the exact same schema. If not, then you will need to shape the data for each one in order to produce a standardized/common schema to the gallery control.
Also, you are using the SelectedText property which is deprecated. You should avoid that and use just the Selected property.
Your formula is incorrect and should then become the following using a Switch function rather than an If:
Switch(Dropdown4_3.Selected.Value,
"July", July,
"August", August
)
I hope this is helpful for you.
Hi @JSnapp
Try by using "Or" in between two conditions
If( Dropdown4_3.SelectedText.Value="July", July Or Dropdown4_3.SelectedText.Value = "August", August])
User | Count |
---|---|
258 | |
111 | |
95 | |
48 | |
41 |