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 / Left formula error...s...
Power Apps
Answered

Left formula error...sometimes!

(0) ShareShare
ReportReport
Posted on by 355
Hi all,
 
This has my head scratching and need bigger brains to help!
 
I have a Sharepoint list as source and one field is a choice field with the ability to select multiple options. To display the selected options in a gallery I've used this formula, on occasion I get an error (which also shows in live) "The Second argument to the 'Left' function is invalid". Sometime the error it shows in the gallery and sometimes not. If there is no value in the field would that cause and error?
 
Left(Concat(ThisItem.'Division Impact'.Value, Value & ", "), Len(Concat(ThisItem.'Division Impact'.Value, Value & ", "))-2)
 
 
With thanks
Neil
Categories:
I have the same question (0)
  • Verified answer
    CarlosFigueira Profile Picture
    Microsoft Employee on at
    Yes, you are correct - if there are no values, then the Concat expression would return an empty text, so the second argument to the Left function would be -2 (which is invalid).
     
    You can use the third argument to the Concat function to pass the separator, this way you won't need to calculate the length to remove the last ', ' instance:
    Concat(ThisItem.'Division Impact', Value, ", ")
    Hope this helps!

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard