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 / Select function - hand...
Power Automate
Unanswered

Select function - handle missing properties

(0) ShareShare
ReportReport
Posted on by 31

Hi,

 

I have a problem with the function SELECT. 

I want to select data from the HTTP request. Http request is geting test cases with properties (Title, RunBy,Tester,Outcome,Date,TestPlan).

Some test cases were not performed so they don't have properties (RunBy,Outcome,Date). 

Therefore in action  SELECT I would like to select properties RunBy,Outcome,Date only when the exist. If they don't exist I want to put some text as a property.

 

JackP_1-1652198368383.png

 

 

For example for property RunBy in SELECT action I tried to use following formulas:

1. 

if(empty(triggerbody()?['lastResultDetails']['runBy']['DisplayName']),'',triggerbody()?['lastResultDetails']['runBy']['DisplayName'])

Result: Property RunBy is always emtpy.

2. 

if(empty(item()?['lastResultDetails']['runBy']['DisplayName']),'',item()?['lastResultDetails']['runBy']['DisplayName'])

Result: error - item runBy can't be selected

 

Can you help me create the proper formula please? 

 

 

Thank you 

 

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,681 Super User 2025 Season 2 on at

    Hi @JackP ,

     

    Can you post the output value property from the Send HTTP action please. Then we can see the structure of the data and the actual properties that we need to use in the expressions.

     

    Ellis

  • JacekP Profile Picture
    31 on at

    Hi,

    Thank you for your response. 

     

    Example of HTTP request value where there are properties for one test case:

    JackP_0-1652250239402.png

     

    If there are more test cases in HTTP request response, then some of them might not have 'yellow' part (when the test run for particular test case was not performed). 

     

    Thank you

  • Verified answer
    JacekP Profile Picture
    31 on at

    Hi,

     

    I found the solution. I was going to deep into properties. 

    It should be:

    if(empty(item()?['lastResultDetails']),'',item()?['lastResultDetails']['runBy']['DisplayName'])

     

    instead of 

     

    if(empty(item()?['lastResultDetails']['runBy']['DisplayName']),'',item()?['lastResultDetails']['runBy']['DisplayName'])

     

    Topic can be closed.

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard