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

Check if Inputfield contains string value of another inputfield

Hello

 

I made a litte project to clarify my question:

 

Is Match.png

 

When the (is match?) Button is pressed the MatchLabel (green) will get the value of matchVar which is either "match" or "no match". This depends on if the two MatchInput fields have an equal text or not. This works fine.

 

My Problem:

I cannot check if the ContainsIputLeft contains the value of ContainsInputRight which I do like this:

IsMatch(ContainsInputLeft.Text;ContainsInputRight.Text;MatchOptions.Contains & IgnoreCase)

 

IsMatch() needs a String as second Parameter which looks like this:

contains.png

However now I always check if the ContainsInputLeft Inputfield contains a "p" and not the value of ContainsInputRight like it should be.

 

Anyone any Ideas on how to check if a value of an inputfield is included in an value of another inputfield?

1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @Anonymous 

 

You can use the expression as:
 
Ignore case: If(Lower(TextInput2.Text) in Lower(TextInput1.Text),Set(containsVar,"Contains"),Set(containsVar, "DoesNot COntain"))
 
Does Not ignore Case: If(TextInput2.Text in TextInput1.Text,Set(containsVar,"Contains"),Set(containsVar, "DoesNot COntain"))
 
Here, TextInput2 is the control that contains value like "p" and TextInput1 will be the text where you want to find the textinput2 value.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
yashag2255
Dual Super User II
Dual Super User II

Hi @Anonymous 

 

You can use the expression as:
 
Ignore case: If(Lower(TextInput2.Text) in Lower(TextInput1.Text),Set(containsVar,"Contains"),Set(containsVar, "DoesNot COntain"))
 
Does Not ignore Case: If(TextInput2.Text in TextInput1.Text,Set(containsVar,"Contains"),Set(containsVar, "DoesNot COntain"))
 
Here, TextInput2 is the control that contains value like "p" and TextInput1 will be the text where you want to find the textinput2 value.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Anonymous
Not applicable

Wow thanks for the fast reply!

 

This is a awesome solution thank you!

 

I was worried that it would be case sensitive but its NOT.

 

Have a nice day!

 

 

 

Helpful resources

Announcements
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 (1,149)