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 / Trouble with the yes/n...
Power Apps
Unanswered

Trouble with the yes/no data type

(0) ShareShare
ReportReport
Posted on by 171

I have a column in the datavserse table with the data type Yes/No and now I want to check in the powerapp whether this value is set to Yes or No. I want to check whether this value is set to Yes or No in the powerapp. This was also possible with the command: 

If(ThisItem.Favorit,'Star 24dp_blackOn', 'Star 24dp_black')

The command is executed on an image so that it switches through an onselect between two different images.

 

But I had to change the structure and therefore I no longer access the table directly but via a collection.

ClearCollect(colSearchFavourites, AddColumns('Order Employee Activities', "FavouriteStatus",Choices('Favourite (Order Employee Activities)')))

Then I had to change the command on the image to:

If(ThisItem.FavouriteStatus, 'Star 24dp_blackOn', 'Star 24dp_black')

I get the following error message: Invalid argument type (Table). Expecting a Boolean value instead.

Do any of you know a solution to my problem or possibly a better solution? (Attached is a picture of the column in question.)

 

The general problem: I had to restructure the collection because I needed a full text search on my table. The search was triggered via an input field. In the table there are different data types, text and numbers. The problem was that I could not search numbers and texts at the same time with Search. So I was recommended by the community to do it via the collection and then my current problem appeared.

 

Bildschirm­foto 2023-03-20 um 12.11.03.png
Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @alt88 ,

     

    When adding the column to your collection, you are using the Choices function, which returns a table with all possible options. Instead you need the (boolean) value. Can you please share in what data source / column name the value is stored?

     

  • alt88 Profile Picture
    171 on at

    The data source is a table in the dataverse and the displayname of the column is favourite and data type is yes/no and the labels are "Ja" and "Nein". There is also a screenshot of it in my post. The collection then looks like this.

    Bildschirm­foto 2023-03-22 um 09.28.21.png
    Bildschirm­foto 2023-03-22 um 09.29.58.png
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @alt88 ,

     

    What is the name of the Dataverse table that has the 'Favorit' column in it?

  • alt88 Profile Picture
    171 on at

    The name of the table is 

    Order Employee Activities
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    HI @alt88 ,

     

    Thanks. Can you try this for the collection:

     

    ClearCollect(
     colSearchFavourites, 
     AddColumns(
     'Order Employee Activities', 
     "FavouriteStatus",
     Favorit.Value = "Ja"
     )
    )

     

  • alt88 Profile Picture
    171 on at

    I have tried it and get the following errors: 

    • Name isn't valid. 'Value' isn't recognized. This error appears most commonly when a formula refers to something that no longer exists (for example, a control that you've deleted).
    • Incompatible types for comparison. These types can't be compared: Error, Text.

      We can't evaluate your formula because the values being compared in the formula aren't the same type.

    Bildschirm­foto 2023-03-22 um 15.06.50.png
  • mritachi Profile Picture
    11 on at

    Not sure if this thread is still open but I was having a similar issue and figured it out by putting: 

     

    (insert_yes_no_column_here) = Boolean(0) - for false 

    (insert_yes_no_column_here) = Boolean(1)  - for true

     

    and it worked. Hope that helps someone. 

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard