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)
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!
1 people found this reply helpful.
Was this reply helpful?YesNo
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.