I built a Power Automate flow from a Form to Planner. The Form is for employees at my company to fill in and I ran into this issue:
1. You cannot limit the free text fields on MS Forms to a custom character limit so sometimes people submit things that are too long
2. Checklists in Planner have a 100 character limit
3. If the user submits something longer than that in the Form it breaks the flow and the Planner card is empty
My question is, can I write a condition to say "if the characters entered is greater than 100 display N/A"?
the error if the characters submitted exceeds 100
yes, with the condition I posted above. use length('your string input') greater than or equal to/less than or equal to. then do the action on the yes/no branch. it's up to you how you construct the logic. hope this helps.
Ahhh yes I see that now - is there any way to make it <= a certain amount of characters?
@annie2 that's great. the only reason I was suggesting checking the length is because the flow will throw an error if the string is less than the length you specify in the substring
I didn't do this exactly but I did use the substring function to shorten the checklist item and that worked, thank you!
@annie2 you can definitely write a condition and check the length of the submitted text with the below and return any value you'd like
length('your string')
but it's probably better to add a condition to return the first 100 characters with the substring expression if the length of the input exceeds 100 characters.
substring(text: string, startIndex: integer, length?: integer)
here's an example of how you can do it.
obviously replace the 'outputs('Compose_2')' with your control.
realised I didn't include the code I used in the yes branch
substring(outputs('Compose_2'),0,100)
If you found this response useful, give it a thumbs up and don’t forget to mark your post answered to help others find the solution easier.
WarrenBelz
146,635
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional