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 / Expression giving me t...
Power Automate
Answered

Expression giving me trouble

(0) ShareShare
ReportReport
Posted on by 4

In order to format some bullet pointed data in a way that it flows nicely from power apps into a word document, the data needs to be edited in power automate.

 

I wrote a simple (ish) expression to replace the html line breaks which come out of power apps to a uri format that word will know and use in its content controls

replace(outputs('supportingDocs'),'<br/>',uriComponentToString('%0A'))

This expression works like a charm and does exactly what i need it to do... apart from when data comes through blank and my flow breaks..


if(empty(outputs('supportingDocs')), "Not Supplied", replace(outputs('supportingDocs'),'<br/>',uriComponentToString('%0A')))

I looked at an if statement but this expression is apparently invalid and I can't quite put my finger on why.

 

Any help would be much appreciated!!

Categories:
I have the same question (0)
  • Verified answer
    v-chengfen-msft Profile Picture
    on at

    Hi @Ashfords ,

    The reason for this problem is:
    1. You are using double quotes around Not Supplied

    Please try :

     

    if(empty(outputs('supportingDocs')), 'Not Supplied', replace(outputs('supportingDocs'),'<br/>',uriComponentToString('%0A')))

     

    Best Regards

    Cheng Feng

  • Ashfords Profile Picture
    4 on at

    Wow. Knew it would be something simple like that. I had a long day alright!

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard