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

Community site session details

Session Id : +zgVVvwWwrbjdGyEbyoEQt
Power Apps - Microsoft Dataverse
Answered

If Statement for a dataverse Yes/No record

Like (0) ShareShare
ReportReport
Posted on 31 Aug 2021 14:20:51 by 603

Hi all,

 

I've a dataverse database. 

In my database I've a yes/no column, called tasktype.

When I try to set a label in my gallery that show the name record when task type is set on Yes and if it's Set on No, it should be show the value of a dropdownlist.

Now I'm strubeling to achieve this. (I've done it a lot of times with SharePoint as datasource, but now with dataverse it will not work properly.)

 

My formula:

 

If(ThisItem.TaskType ="Yes",ThisItem.Name,ThisItem.'Task (Pre_task)')

 

 

 

Does anyone how to achieve it / Why it's not working?

 

 

Categories:
I have the same question (0)
  • Verified answer
    haroldk Profile Picture
    on 31 Aug 2021 at 17:08:01
    Re: If Statement for a dataverse Yes/No record

    Since TaskType is a Yes/No field which is an Option set use

    You can do something like this:

    If(ThisItem.TaskType, "Red", "blue")

  • Prakash4691 Profile Picture
    1,332 on 31 Aug 2021 at 15:21:51
    Re: If Statement for a dataverse Yes/No record

    @dennisb88 ,

     

    If you are setting it for a label, you will not get "ThisItem" object instead use "BrowseGallery1.Selected.yourfield".

     

    If you are trying to set for any datacard, a field which available in table/entity then ThisItem object will be available.

     

    Try below, I have used custom label. To check for optionset, you have to use optionset value instead of string like below.

     

    Find is yes or no option set with values allowed and not allowed.

     

    If(BrowseGallery1.Selected.Find = 'A Yes or No boolean'.Allowed, BrowseGallery1.Selected.Name, "yes")

     

    If it answers your question, kindly give kudo and accept is as solution.

     

     

    Regards,

    Prakash

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 982 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 396 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 356

Last 30 days Overall leaderboard

Featured topics

Loading complete