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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / getting error when usi...
Power Automate
Unanswered

getting error when using replace and coalesce together

(0) ShareShare
ReportReport
Posted on by 1,936 Super User 2024 Season 2
replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(outputs('mailTemplateCompose'), '{{EMPLOYEE_NAME}}', items('Apply_to_each')?['ToMeet/DisplayName']), '{{VISITOR_NAME}}', outputs('visitorMaster')?['body/Name']), '{{VISITOR_PHONE}}', outputs('visitorMaster')?['body/MobileNumber']), '{{VISITOR_COMPANY}}',coalesce(items('Apply_to_each')?['VisitorCompany'])), '{{VISITOR_PURPOSE}}', items('Apply_to_each')?['Purpose']), '{{MY_DEPARTMENT}}', items('Apply_to_each')?['Department']), '{{MY_FLOOR}}', items('Apply_to_each')?['Floor']), '{{VISITOR_LAPTOP}}', items('Apply_to_each')?['LaptopID']), '{{VISITOR_VEHICLE_NUMBER}}', items('Apply_to_each')?['VehcileNumber']), '{{VISITOR_ID_PROOF}}', outputs('idProof')?['body/GovtIDType/Value'])

this is my code and I don't know how what is wrong here it is working fine without coalesce but I have to use coalesce because of null value.

Categories:
  • Chriddle Profile Picture
    8,725 Super User 2026 Season 2 on at

    You should format your code to make it readable 😉

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 132

Last 30 days Overall leaderboard