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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to show choice val...
Power Apps
Unanswered

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard