cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Morghan
Helper IV
Helper IV

Condition syntax - PowerApps Custom form

Hello,

 

I have a Choice column in a custom list where I am also creating a custom PowerApps form. I want to display the "Envelope Type" card (aka "Envelope Type_DataCard1") if "Envelopes" is one of the chosen items from the drop-down choice list (aka DataCardValue14) in my screenshots; OTHERWISE hide the card if Envelopes is not chosen at all. It works if I ONLY choose Envelopes, but if I choose other items, it is hiding the card. I searched online but not finding a straight forward answer... What would the syntax be for "Rule2" in my screenshot?

 

screenshot-001..jpg

 

screenshot-01..jpgscreenshot-02..jpg

 

 

Thank you in advance,
M

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

HI @Morghan ,

Do you want to enable multiple options within the "What do you need?" field data card (DataCardValue14)?

 

Based on the needs that you mentioned, I think it is not necessary to create a Rule to achieve your needs. Please consider take a try with the following workaround:

Set the Visible property of the Envelope Type_DataCard1 in Edit form to following:

If(
    "Envelopes" in DataCardValue14.SelectedItems.Value,
     true,
     false
)

 

If you still want to create a Rule to achieve your needs, please modify the formula within the Condition box of your Rule as below:

 "Envelopes" in DataCardValue14.SelectedItems.Value

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards, 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Krishna92
Microsoft
Microsoft

@Morghan 

 

Could you please try the expression 

"envelope" in Datacardvalue14.selected.value

 

Also please try updating the visibility property of the envelope card with above expression by enclosing it in a if condition and check if that helps.

 

if("envelope" in Datacardvalue14.selected.value,true,false)

 

v-xida-msft
Community Support
Community Support

HI @Morghan ,

Do you want to enable multiple options within the "What do you need?" field data card (DataCardValue14)?

 

Based on the needs that you mentioned, I think it is not necessary to create a Rule to achieve your needs. Please consider take a try with the following workaround:

Set the Visible property of the Envelope Type_DataCard1 in Edit form to following:

If(
    "Envelopes" in DataCardValue14.SelectedItems.Value,
     true,
     false
)

 

If you still want to create a Rule to achieve your needs, please modify the formula within the Condition box of your Rule as below:

 "Envelopes" in DataCardValue14.SelectedItems.Value

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards, 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @v-xida-msft - that was exactly it. I was using "Selected.Value" instead of "SelectedItems.Value" - Thank you!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (3,297)