Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - General Discussion
Suggested answer

trouble with replace/trim

(1) ShareShare
ReportReport
Posted on by
Some context--
we had staffing turnover, which unfortunately (and frustratingly) means we lost access to form that we regularly use that was attached to a fairly complex power automate flow.
 
luckily, we still had access to the flow and had a draft form that we could more or less recreate.
 
I knew I would have to do some finetuning within the flow, replacing the dynamic content etc. However, I did NOT expect that formulas that previously worked would stop working after I replaced the dynamic content to match the new form.
 
I am trying to use a replace/trim function that takes a first and last name and formats it Last,First and removed extra spaces on either end. 
 
This is what the two formulas looks like:
 
I am getting this error message:
 
 
The only difference between this formula and the one that previously worked is the dynamic content. I did not change it in any other way.
 
Help?
Categories:
  • Suggested answer
    Michael E. Gernaey Profile Picture
    40,272 Super User 2025 Season 1 on at
    trouble with replace/trim
     
    Happy to help. I typed it and your) are in the wrong place
    You have
     
    replace(trim(outputs('Get_response_details-_from_intake_and_enrollment_form')?['body/rd7f92a702020cd4b5c882f588dcac80bb4'],'''',''''''))
     
    the issue with this is your trim, is actually closed at the end going passed your replace, and while you don't get a visual error, it is a functional one.
     
    You should have
    replace(trim(outputs('Get_response_details-_from_intake_and_enrollment_form')?['body/rd7f92a702020cd4b5c882f588dcac80bb4']),'''','''''')
     
    If this helps please Mark this as resolved and maybe a like.
     
    Cheers
     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,898 Most Valuable Professional

Leaderboard