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 / check for null or blan...
Power Automate
Unanswered

check for null or blank values in json values

(1) ShareShare
ReportReport
Posted on by 2,249
How to check for null and blank values in the below json expression?
json(concat('{ "', replace(replace(triggerOutputs()?['body/subject'],':','" : "'),'\','", "'),'" }'))
 
When new email arrives with subject customer name:John\Customer no:12345 im using above expression and store in list item and what i ask is that if my subject has null or blank or unnecessary blank spaces it should remove for example 
customer name:    \     Customer no:12345      //name is empty and some spaces between name \  customer no values
Categories:
I have the same question (0)
  • Verified answer
    Dieter Gobeyn Profile Picture
    29 on at

    I can't see your total solution here, but based on the info you've provided you might want to look in the below functions:

     

    To remove leading & trailing whitespace from a string:

    trim('customer name: ')

    See: https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#trim 

     

    To check if a value is empty, this will return true if the value is empty. I suggest to do a trim() first.

    empty(variables('myvar'))

    see: https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#empty 

     

    If I've been helpful, please mark my answer as Resolved/Answered and give it a thumbs up. This will help others too.

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

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard