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 / Conditionally add comm...
Power Apps
Answered

Conditionally add comma to print text inside a label control

(0) ShareShare
ReportReport
Posted on by 54

Hi fam,

 

I am using the concat function for the text property of a Label in order to have Commas, between each record like this. 'CAS Dependency' is a multi select choice type column in SharePoint List(My data source)

 

WhatsApp Image 2022-08-15 at 8.11.55 PM.jpeg

 

 

But I don't want to print a Comma where there is just one record and on the last record .

EX : Record1,record2,

or Record1,

 

Expected behavior : Record1, Record2, Record3

 

I tried finding a way where I could count the number of records so that I can use that as a counter for a loop inside a conditional statement but couldn't find any. Please help.

 

Thanks and Regards 🙂

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @AdityaDani 

    Please consider changing your Formula to the following:

    With({_t: 
     Concat(ThisItem.'CAS Dependency'.Value, 
     Text(Value) & ","
     )
     },
     Left(_t, Len(_t)-1)
    )

     

    I hope this is helpful for you.

  • AdityaDani Profile Picture
    54 on at

    Bang on man.

     

    I want to be able to learn and understand this, can you please provide me some resources or topics which I could search on google to have a better understanding on this.

     

    Thanks a ton .  🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard