cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Vidanaw
Level: Powered On

How to chcek collection filed value

Hi All,

I have a collection wich load with SharePoint data source. In the collection I have a field called Status (mapped with SharePoint choose column type), now I want to check is this value is equal to "Open".

FYI- this collection have only one item at any given time.

 

I need something like if( Collection.Status = Open, UpdateContext({btndisplay:false}), UpdateContext({btndisplay:true}))

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: How to chcek collection filed value

If the collection will only ever have one record then you can check this way.

if( First(Collection).Status.Value = "Open", UpdateContext({btndisplay:false}), UpdateContext({btndisplay:true}))

Using First() will get the first record.  Then you can check the Status field of that record.  Since its a choice field you will need to use the specific name of the property of the field that holds the value Open.  This is usually Value, but can be other things.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
mdevaney
Level 8

Re: How to chcek collection filed value

@Vidanaw
The solution is to change your collection reference into a record using the FIRST function. Fortunately this will not take much time to do.

if(First(Collection).Status = ”Open”, UpdateContext({btndisplay:false}), UpdateContext({btndisplay:true}))

—-
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.
Dual Super User
Dual Super User

Re: How to chcek collection filed value

If the collection will only ever have one record then you can check this way.

if( First(Collection).Status.Value = "Open", UpdateContext({btndisplay:false}), UpdateContext({btndisplay:true}))

Using First() will get the first record.  Then you can check the Status field of that record.  Since its a choice field you will need to use the specific name of the property of the field that holds the value Open.  This is usually Value, but can be other things.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Vidanaw
Level: Powered On

Re: How to chcek collection filed value

Thank you very much, really appreciate the assistance.

Thanks.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 203 members 5,534 guests
Please welcome our newest community members: