web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Formula problem (Incom...
Power Apps
Unanswered

Formula problem (Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

(0) ShareShare
ReportReport
Posted on by 909

Hello,

 

I have a problem with this formula:

 

If(DataCardValue18.Selected.Value =! "Legal Law";true;false) && !IsBlank(DataCardValue22.Text); Notify("To write a text you need a Legal Law category.";

It prints error : (Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

 

And does not work.

I DataCardValue18 is a combo box multi choice - DataCardValue22 is a text field that is active only if Legal Law is provided in DataCardValue18.

 

Right now in my app you can set legal law category for a second and provide a datacardvalue22 value - then you can uncheck this category and the text will remain.

I want to avoid it with this validation.

 

I also tried to: 

If("Legal Law" not in DataCardValue18.SelectedItems.Value && !IsBlank(DataCardValue22.Text);
Notify("Description.";
NotificationType.Error);

Not to seems not to work.

 

There might be not enough )))) at the end but it is because this is a part of a bigger formula.

Everything seems to work bot not this...

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

     Try this:

    If("Legal Law" not in DataCardValue18.SelectedItems.Value && !IsBlank(DataCardValue22.Text); Notify("Description";NotificationType.Error))

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

    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.

  • Elitezone Profile Picture
    909 on at

    Invalid amount of argument. Received 1, expected 2

    Elitezone_0-1601276653276.png

    Expected operator. In this place of formula operator like + * & is expected.

    Invalid usage of .

     

     

    This is my whole formula, and I want this validation to be added to it:

     

    If(IsBlank(DataCardValue11.Text);Notify("Add name.";NotificationType.Error);
    If(IsBlank(DataCardValue18.Selected.Value);Notify("Add category.";NotificationType.Error);
    If("Legal Law" in DataCardValue18.SelectedItems.Value && IsBlank(DataCardValue22.Text);
    Notify("If you chose Legal Law you need to provide a description.";
    NotificationType.Error);
    If(Len(DataCardValue19.Text) < 79;Notify("In descrption field you need at least 80 characters.";NotificationType.Error);
    If(IsBlank(DataCardValue9.Selected.Value);Notify("You need to provide a range of modification.";NotificationType.Error);
    UpdateContext({variableDefault:" "});UpdateContext({showDialog:true;variableDefault:""}))))))

    This formula works well, but I need this one validation in it.

  • Elitezone Profile Picture
    909 on at

    Anyone?

  • Elitezone Profile Picture
    909 on at

    Anyone?

    Bump.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard