web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trim MS Forms entry to...
Power Automate
Unanswered

Trim MS Forms entry to fit the title of a planner task

(1) ShareShare
ReportReport
Posted on by 9

Hi,

I'm currently builing a flow where a user can fill in a MS form. This form will result in a planner task on our kanban board, and will send out a confirmation email. I thought I tested everything, but on the real first use, the user entered more characters in the MS forms than that are allowed in the planner task (255 char). 

 

Now I'm looking into a simpel solution that the creation is not failing. Sadly it is not possible to restrict the total characters used in the MS forms. So it seems I need to find a solution in the flow. 

 

I found some information on the forum which uses substring, to trim the entered information. I compose the information to check the length with a "condition", which result in a "yes/No" flow. 

 

From this point I want to create the task. Is there a way to fill the titel based on the "Condition"? So if Yes (bigger than 255), fill it with trimmed string. If no, fill it with the original entry? I figure this needs to happen with an "if-statement", but I can't figure out which one. 

If there is an easier way to fill the title with a trimmed string I'm also interested :). I would like to keep te flow simpel, so my colleagues can also understand it. 


Categories:
I have the same question (0)
  • Elzzie Profile Picture
    9 on at

    I see the image is a bit blurry, maybe this helps: 

    Flow.png

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    You can use the following expression that will ensure a maximum of 255 characters are returned, and any white space at the start/end of the string is removed.

     

    //My example where the text I want to truncate/trim is within a Compose action
    trim(slice(outputs('Compose'), 0, 254))
    
    //What you would use
    trim(slice(YOUR_FIELD, 0, 254))


    ----------------------------------------------------------------------
    If I've answered your question, please mark the post as Solved.
    If you like my response, please consider giving it a Thumbs Up.

  • Elzzie Profile Picture
    9 on at

    Thanks for your reply. This did the trick, this is the way! 

    So to get this working I added a second "compose" action behind the first one. The first compose adds the fields together in one string. The second "compose" with your code, contains the output of the first compose. 

    For creating the task, I filled in the output of the second compose. 

    Thanks for your help!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard