cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sachinsoni441
Helper II
Helper II

Want to get single column from collection.

Hello experts,

 

I have one single row collection which has 3 columns.

 

Example

1. ID

2. Name

3. Status

 

How can i get Status column value, because i want to show this status in label.

Note :Collection always having single row only.

 

Please help.

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User
Super User

@sachinsoni441 

The Collection must be converted to a record to get the Status.  Put this code in the Text property of a label.

First(your_collection_name).Status

 

Or you can use this code if Status was coming from a Choices column in SharePoint initially.

First(your_collection_name).Status.Value

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
mdevaney
Super User
Super User

@sachinsoni441 

The Collection must be converted to a record to get the Status.  Put this code in the Text property of a label.

First(your_collection_name).Status

 

Or you can use this code if Status was coming from a Choices column in SharePoint initially.

First(your_collection_name).Status.Value

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Pstork1
Dual Super User
Dual Super User

If the column is always guaranteed to have a single row you could use the following to get the value of the status column

First(collection).Status


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

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

RTB_10
Helper I
Helper I

Does anyone have any possible solutions for when the column is not going have a single row?

Pstork1
Dual Super User
Dual Super User

If you surround the First() with a coalesce you should be able to substitute a placeholder value when the array returned is null.

Coalesce(First(collection).Status,"No Status")


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

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (2,533)