cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Brigettebayne
Frequent Visitor

Confirm 2 fields

I created a Canvas form in Powerapps - I have embedded it into a Sharepoint. 

I have 2 fields (SSN) and (Confirm SSN).   I want the user to receive an error if the Confirm SSN field does not match that of the SSN field.  

I'm sure this is something simple that I am overlooking but I feel like I have read every "How To" there is to read at this point and my deadline is coming up. 

I made the fields "text" fields.  So they are text fields that will need to match.

Any help is greatly appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Confirm 2 fields

@Brigettebayne
Thank you for the amazing screenshots!

The error is appearing because you put it in the OnSelect property. For instance if you put this code in the BorderColor property instead the border would turn Red if the two inputs don’t match

If(TextInput1.Text=TextInput2.Text, Black, Red)

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

View solution in original post

7 REPLIES 7
Brigettebayne
Frequent Visitor

Re: Confirm 2 fields

Sorry - I should have given more information.   I made the fields "text" fields.  So they are text fields that will need to match.

Super User
Super User

Re: Confirm 2 fields

@BridgetteBayne
The code to compare two Text Inputs would look something like this. If you put it in the OnSelect property of a label it will show true when matching and false when different.

TextInput1.Text=TextInput2.Text

Let me know what further instructions you require.

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
Brigettebayne
Frequent Visitor

Re: Confirm 2 fields

Thank you so much for the prompt response.  I tried that one already but I just did it again, and it is giving me an error. 

 

Super User
Super User

Re: Confirm 2 fields

@Brigettebayne
Thank you for the amazing screenshots!

The error is appearing because you put it in the OnSelect property. For instance if you put this code in the BorderColor property instead the border would turn Red if the two inputs don’t match

If(TextInput1.Text=TextInput2.Text, Black, Red)

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

View solution in original post

Brigettebayne
Frequent Visitor

Re: Confirm 2 fields

Hoping you can look at this.  I truly don't know where I'm going wrong here. 

Super User
Super User

Re: Confirm 2 fields

@Bridgettebayne
It would be something like this

If(DataCardValue46.Text=DatacardValue47.Text, Black, Red)

I can’t actually tell if it’s DataCard47 since the screenshot is cut off but you should be able to confirm the number

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
Brigettebayne
Frequent Visitor

Re: Confirm 2 fields

There is clearly something off in my SP columns or fields somewhere.  The error keeps telling me that Data Type for my fields is unsupported for evaluation.  Even though it is basic text.  And because I created in Canvas (I assume that is why), I cannot change the control. The option is there in the Fields, but when I select it, it does nothing.  But I am going to mark your answer as the solution because I know that should my controls be set properly, it would have worked just fine. 

 

Thank you for your time and assistance.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,794)