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 / How to add single quot...
Power Automate
Answered

How to add single quote in an expression

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

 

I am building an expression. So that when triggerBody()['text_1'] is null, it should return null (no quote). If it has value (e.g. value), it should return 'value' (with single quote). How can I do it? The Power Automate builder keep prompting for "The express is invalid".

 

if(empty(triggerBody()['text_1']),'null',''triggerBody()['text_1']'')

Categories:
I have the same question (0)
  • Verified answer
    MF-12051538-0 Profile Picture
    402 on at

    Hi @Anonymous ,

    To get single quotes to appear you'll have to use four quote marks in a row (i.e. ''''). Additionally, you'll need to concatenate them together instead of just placing them before and after the triggerBody()['text_1'].

    Try this code:

    if(empty(triggerBody()['text_1']), 'null', concat(concat('''',triggerBody()['text_1']),''''))


    If you found this post helpful, please consider Accepting it as the solution.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard