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

How to add single quote in an expression

(0) ShareShare
ReportReport
Posted on by

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

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard