cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Multiple Verification

Hi powerapps community, I am struggling with an application and need your help.

 

In my app I have for example de following table 

DessertIngredientBar Code
CookiesFlavor1234
CookiesChocolate 12345
CookiesMilk123456
CookiesEggs12
CakeFlavor1234
CakeVanilla123
CakeMilk123456
CakeEggs12

I have 2 dropdowns and 1 textinput so i need the following: 

 

first dropdown select the dessert (done)

 

second dropdown select the ingredient filterd by the dessert dropdown selection (done)

 

and this is what i´m struggling in the textinput I type the barcode but I need to create a formula to change de fill color depending on the typed text (if the barcode exist in the selected dessert and ingredient fill green if not fill red) i made the following code: 

 

If(Dropdown1.Selected.Result=LookUp(Table1;'Bar Code '=TextInput1.Text;Dessert) && Dropdown2.Selected.Result=LookUp(Table1;'Bar Code '=TextInput1.Text;'Ingredient');RGBA(54; 176; 75; 1);RGBA(255; 0; 0; 1))

 

So if I type in the textinput 1234 selecting cookies and flavor y does change green (1234 is the bar code for the flavor and the flavor is used in the cookies) but if I select cake and flavor it changes to red (1234 is the bar code for the flavor and the flavor is used in the cake but as the lookup formula shows only the first value the formula is not able to see that this condition that i need to evaluate also is true)

 

can you please help me find the correct formula for this example?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous :

Please try this code:

If(TextInput1.Text in Filter(Table1;Dessert=Dropdown1.SelectedText.Value && Ingredient=Dropdown2.SelectedText.Value).'Bar Code';RGBA(54; 176; 75; 1);RGBA(255;0;0;1))

27.gif

 Best Regards,

Bof

View solution in original post

4 REPLIES 4
eka24
Super User
Super User

Try

If(Filter(Datasource;Dessert=Dropdown1.Selected.Result && Dropdown2.Selected.Result=Ingredient &&'Bar Code '= TextInput1.Text);RGBA(54; 176; 75; 1);RGBA(255; 0; 0; 1))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

Anonymous
Not applicable

It doesnt work it send a error message that if have no non valid arguments, and it says that the datasource is not valid because it was expectede a boolean data

Hi @Anonymous :

Please try this code:

If(TextInput1.Text in Filter(Table1;Dessert=Dropdown1.SelectedText.Value && Ingredient=Dropdown2.SelectedText.Value).'Bar Code';RGBA(54; 176; 75; 1);RGBA(255;0;0;1))

27.gif

 Best Regards,

Bof

Anonymous
Not applicable

Thanks a lot for the help!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,042)