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

Check equality of two combobox

Hi,

I need to check if the values of two combobox are the same before validate my form, but it seems like powerapps can't evaluate the value of two tables

Here is my code :

If(
    DataCardValue11.SelectedItems.Num_Parc = DataCardValue7.SelectedItems.Num_Parc;

    Notify(
        "Values can't be the same";
        NotificationType.Error
    );

    SubmitForm(myForm);
);;

The error comes on the equal sign : "Invalid argument type"

Thanks !

1 ACCEPTED SOLUTION

Accepted Solutions

@DrrickrypIt drop me an error : "Expected Text Value"

 

I found myself a solution by comparing the JSON value of each datacard : 

 

If(
    JSON(DataCardValue11.SelectedItems.Num_Parc) = JSON(DataCardValue7.SelectedItems.Num_Parc);

    Notify(
        "Values can't be the same";
        NotificationType.Error
    );

    SubmitForm(myForm);
);;

 

After many test, it seems to work well !

Anyways, thank for your answer 🙂

View solution in original post

2 REPLIES 2
Drrickryp
Super User II
Super User II

Hi @BaptisteP 

If you put two labels on your screen with Text properties of   DataCardValue11.SelectedItems.Num_Parc  and DataCardValue7.SelectedItems.Num_Parc, respectively, what do you see in the labels?

@DrrickrypIt drop me an error : "Expected Text Value"

 

I found myself a solution by comparing the JSON value of each datacard : 

 

If(
    JSON(DataCardValue11.SelectedItems.Num_Parc) = JSON(DataCardValue7.SelectedItems.Num_Parc);

    Notify(
        "Values can't be the same";
        NotificationType.Error
    );

    SubmitForm(myForm);
);;

 

After many test, it seems to work well !

Anyways, thank for your answer 🙂

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

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