cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
batvan276
Resolver II
Resolver II

Expression to display n/a if EMPTY and display original input if not blank

Hello Community, 

 

I keep getting an invalid expression and keep getting Blanks  with the below ; 

 

if(empty('Responses Comments'),'n/a','Responses Comments')
 
I am trying to input "n/a" in a Send Email Action if an approver did not input any Approver Comments. 
 
Appreciate any input. 
 
batvan276_0-1647264314936.png

14-03-2022 9-26-07 AM.png

 

 

 

 

 
 

 

 

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
batvan276
Resolver II
Resolver II

I hovered over Responses Comments and figured it out 

 

batvan276_0-1647347820665.png

 

if(empty(items('Apply_to_each_2')?['comments']),'n/a', items('Apply_to_each_2')?['comments'])

 

View solution in original post

3 REPLIES 3
batvan276
Resolver II
Resolver II

Tried the below ; 

 

if (empty(triggerOutputs()?['body/comments']), 'n/a', triggerOutputs()?['body/comments'])

 

n/a appears for both blank and also anything inputted in the Approver Comment field. 

 

 

batvan276
Resolver II
Resolver II

I hovered over Responses Comments and figured it out 

 

batvan276_0-1647347820665.png

 

if(empty(items('Apply_to_each_2')?['comments']),'n/a', items('Apply_to_each_2')?['comments'])

 

Hi @batvan276 

Glad that you have resolved your problem.

And thanks for your posting and sharing the solution in the forum.

Best Regards,

Lily

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,041)