Is there any way to limit the amount of characters in the comments box when approving? I am sending the comments to a single line column in Sharepoint which has a limit of 255 characters. I can't do a multi-line column because I need to use the column as a lookup. When an approver inputs more than 255 characters in comments on Flow and clicks Approve, the approvals are not going through. They are when the comments are less than 255 characters. So is there anyway to limit the characters in Flow?
Can you provide some insight as to why you'll be using the comments as a lookup column?
It generally isn't a great idea. If you make it a multi-line column your issue will likely be resolved.
I want to have a column hidden so a user can't update it. This column gets updated in the flow. And there is a second column which just equals the hidden column so the value can be viewed.
Any update on this? I also need to limit the approval comments because I'm feeding the response back into an InfoPath form read-only text field. InfoPath forces this field to be a single line text box in SharePoint, even though it's still multiline in InfoPath. The field has to be editable in SharePoint in order for Flow to dump the comments into, but InfoPath will not map to a multiline field that allows editing. It's a round-robin issue, and the only way I can see getting around it is to limit the characters in the Approval comments.
While it's not possible to actually limit the number of characters in the out-of-the-box Approval message, there are a variety of ways to trim the data from that field down to 255 characters using expressions. The simplest would be left(<comments>,'255'). Since the "comments" are an array in the approval output, I suggest initializing a string variable (varApprovalComments), then using "Append to string variable" inside an "Apply to each" loop to "compile" the comments (even if there's only one response, it's still an array). Then, you'd add a Compose step to trim varApprovalComments down appropriately.
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!