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 bypass the blan...
Power Automate
Answered

how to bypass the blank field values in Select action

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

 

I am trying to get azure ad user properties using "Invoke an HTTP request".

If the field/property has value then returning the field with value is fine, but the field/property is blank/null connector is not returning the column itself and returns an error saying that the column does not exist.

 

but in Explorer, it returns null. in power automate "Invoke an HTTP request" connector is not returning any null or blank. it returns an error.

muralikrishna12_0-1668777686308.png

 

from power automate 

 

muralikrishna12_1-1668777936996.png

if you observe from the error screenshot, the company name field itself does not exist as it says.

 

first of all the "Invoke an HTTP request" itself does not return the Company Name field

here is the connector API Query 

https://graph.microsoft.com/v1.0/users/88e356d7-fca8-4124-90b6?$select=displayName,mail,userPrincipalName,companyName

here is the response to the above REST API connector it self Company name is excluding because of user property company name is blank/null, if value exist then its returning as expected 

{
 "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(displayName,mail,userPrincipalName,companyName/$entity",
 "displayName": "sample",
 "mail": "sample@outlook.com",
 "userPrincipalName": "sample",
 "id": "88e356d7-fca8-4124-90b6",
}

 

In fact, if we try for another user who has the value from the backend then it gets the company name itself.

 

how to get field value even if it is blank and assign to Select action. because only a few users do not have the Company Name values.

 

any help here, please

 

 

  

Categories:
I have the same question (0)
  • Verified answer
    Sundeep_Malik Profile Picture
    6,501 on at

    Hey @Anonymous 

     

    For this you can try one of the two things. I hope atleast one works for you. 😅

     

    1) Condition Action:

     

    So, the condition action will check that your json data contains a value as companyName or not.

    If it has make a select action for including it.

    And if it does not have it, then make a select action excluding it. 

     

    Sundeep_Malik_0-1668779432975.png

     

    2) To use if inside the selection. Not sure this one would work or not.

     

    Write this expression, or somewhat similar expression:

     

    if(contains(outputs('Compose'),'companyName'),item()?['companyName'],'')
     
    So, in this I am checking if the data contains companyName, if it has, then just take the company name with item()?['companyName'] and if it does not have the company name, just take null with the help of two single quotes without any space between them.
     
    Sundeep_Malik_1-1668779630592.png

     

     

    I hope atleast one works for you. Change some fields or name according to your case. 

     

    If this works for you, you can accept the answer as the solution and if you liked the explanation or even appreciate the effort please give a thumbs up. 🙂

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I think I need to show the screenshot of the flow actions. because Invoke an HTTP request connector itself does not return the company field, if the connector returns the company name either blank/null then we can format it in the select query using the If condition.

     

    muralikrishna12_1-1668781058705.png

     

    Please check the screen, after the connector

    I am setting values into an array to bind and converting them into an array to select each field.

     

    how do check whether a field exists or not from the array,

    this way we can check first if field find then we can understand company name is not blank,

    if Company Name is not found in the array then we can understand and use a select query with the out Company name.

     

    Please reply

     

  • Sundeep_Malik Profile Picture
    6,501 on at

    @Anonymous 

     

    In the above methods, I am first checking if the field is present only. In your case in the condition action, just pass the variable. 

     

    So, just follow the steps I told in the above message. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Option 1 helps me

     

    Thank you @Sundeep_Malik 

  • Sundeep_Malik Profile Picture
    6,501 on at

    So for everyone coming in future to check out the post. The better technique to use for this would be a

    coalesce function.
     
    Here is the answer:
     
    In compose adding json data.
    Sundeep_Malik_0-1668796689814.png

     

    Then using coalesce function in select:

    Expression: 

    coalesce(item()?['companyName'],'empty')

     

    Sundeep_Malik_1-1668796741175.png

     

     

    Final Output:

     

    Sundeep_Malik_2-1668796814329.png

     

    Thanks @Pstork1 for the approach. 🙂

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 412

#2
Vish WR Profile Picture

Vish WR 305

#3
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

Last 30 days Overall leaderboard