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 / triggerBody -> checkin...
Power Automate
Unanswered

triggerBody -> checking of fields that are part of value inside body

(0) ShareShare
ReportReport
Posted on by 18

Hi All,

I have added a condition element where I would like to check if field: "number" has a value, then return true, else return false.
I am using triggerBody to query for attributes that are part of the body inside the XML, where I just do not know how to check the the fields are under the parameter: "Value".

 

flow:

DamjanZ_0-1646742225190.png

 

 

function in conditional element:

funciton=triggerBody()?['value/number'] "is eqaul to" function=null


XML:

{"statusCode":200,
"headers":{
	"Pragma":"no-cache",
	"Transfer-Encoding":"chunked",
	"Vary":"Accept-Encoding",
	"x-ms-request-id":"dd72bbe1-6b0b-41ed-9f27-c6f8f767ff97",
	"Strict-Transport-Security":"max-age=31536000",
	"X-Content-Type-Options":"nosniff",
	"X-Frame-Options":"DENY",
	"Cache-Control":"no-cache",
	"Set-Cookie":"ARRAffinity=f0aa28589a3db95a5755cf48c882d4dee8af3e0328f27a3f83ee7fbc08c91813;Path=/;HttpOnly;Secure;Domain=dynamicssmbsaas-we.azconn-we.p.azurewebsites.net,ARRAffinitySameSite=f0aa28589a3db95a5755cf48c882d4dee8af3e0328f27a3f83ee7fbc08c91813;Path=/;HttpOnly;SameSite=None;Secure;Domain=dynamicssmbsaas-we.azconn-we.p.azurewebsites.net",
	"X-AspNet-Version":"4.0.30319",
	"X-Powered-By":"ASP.NET",
	"Timing-Allow-Origin":"*",
	"x-ms-apihub-cached-response":"true",
	"x-ms-apihub-obo":"true",
	"Date":"Tue, 08 Mar 2022 10:25:01 GMT",
	"Content-Type":"application/json; charset=utf-8; odata.metadata=minimal",
	"Expires":"-1",
	"Content-Length":"1153"},
"body":{
	"@odata.context":"https://flow-apim-europe-001-westeurope-01.azure-apim.net/apim/dynamicssmbsaas/0aa6d94b91a646358be61bc5c5b77fc1/$metadata#bcenvironments('PROD_BACKUP_25032021')/companies(9c9a3a68-c462-eb11-86a3-000d3aeac2ab)/datasets('WKDZ%2FHRCloud%2Fv2.0')/tables('employees')/items",
	"value":[{
		"@odata.etag":"W/\"JzQ0OzVhb3pqZ0tDTnJtYkpoTlJIdG9iOGw3Mm5nSktac3lnZzEyMGx2cGR1S3M9MTswMDsn\"",
		"ItemInternalId":"dc63283a-f88b-eb11-8ce5-000d3a70831b",
		"id":"dc63283a-f88b-eb11-8ce5-000d3a70831b",
		"number":"614",
		"HRCloud":false,
		"HRCloud_GUID":"00000000-0000-0000-0000-000000000000",
		"displayName":"Richard Burkey",
		"givenName":"Richard",
		"middleName":"Essex",
		"surname":"Burkey",
		"jobTitle":"Mechanic",
		"addressLine1":"146 Piney Pathway",
		"addressLine2":"",
		"city":"MAGNOLIA",
		"state":"TX",
		"country":"",
		"postalCode":"77354",
		"phoneNumber":"",
		"mobilePhone":"832-703-8287",
		"email":"rburkey@wkamerica.net",
		"personalEmail":"richard.a.burkey@lonestar.edu",
		"employmentDate":"2018-01-25",
		"terminationDate":"2019-01-21",
		"status":"Terminated",
		"birthDate":"1952-11-22",
		"statisticsGroupCode":"",
		"lastModifiedDateTime":"2021-03-23T18:10:30.577Z"
		}]
	}
}

 

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @DamjanZ :

    Please try:

    triggerBody()?['body']?['value'][0]['number']

    Best Regards,

    Bof

  • Damjan Zakojc Profile Picture
    18 on at

    Hi @v-bofeng-msft 

    I sorted that out, tnx.

    checking if field is blank 

    empty(body('Find_records_(V3)')?['value'][0]?['number'])
     
    and I read a blog about the JSON structure (parameters, objects, array), so field "number" is a parameter inside the first array of value object, and the value is located in the body of JSON.

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