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']'')
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']),''''))
stampcoin
103
Michael E. Gernaey
82
Super User 2025 Season 1
David_MA
60
Super User 2025 Season 1