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.

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

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,468)