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 / How to show choice val...
Power Apps
Answered

How to show choice values in a collection table (countrows)

(0) ShareShare
ReportReport
Posted on by 327

Hi all

 

how can I show the values from SP list choice column in a Collection so I'm able to count rows in the collection table?

 

ClearCollect(
 colAllValues,
 ShowColumns(
 NWAllocation,
 "AllocatedTo"
 )
 )

moerah_0-1705933415412.png

Thank you

 

Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @moerah,

     

    The collection displays this field as a record since a SharePoint choice column (single-select) has the following structure:

    //Record with 1 column called value, containing a text value
    {
     Value: string
    }

     

    Should you want to display the Text value of that choice, you could use the following ClearCollect:

    //Saves a collection with 1 column named 'Value'
    ClearCollect(
     colAllValues,
     ForAll(
     NWAllocation,
     //Should AllecatedTo be written with a space in SP use 'Allocated To'.Value
     AllocatedTo.Value
     )
    )

     

    Please note that displaying the value as text is not required to count certain choice occurrences:

    //The code below assumes your current clearcollect code (record type)
    //Example: only count the choices with value 'abc'
    CountIf(
     colAllValues,
     AllocatedTo.Value = "abc"
    )

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • moerah Profile Picture
    327 on at

    Thank you @LaurensM  very much 👍

     

    this is amazing and has opened a lot of doors for me now thank you again 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard