{"id":2282,"date":"2024-01-16T18:36:30","date_gmt":"2024-01-16T17:36:30","guid":{"rendered":"https:\/\/blog.kodono.info\/wordpress\/?p=2282"},"modified":"2025-03-05T09:59:13","modified_gmt":"2025-03-05T08:59:13","slug":"power-automate-how-to-verify-if-a-property-belongs-to-an-object","status":"publish","type":"post","link":"https:\/\/blog.kodono.info\/wordpress\/2024\/01\/16\/power-automate-how-to-verify-if-a-property-belongs-to-an-object\/","title":{"rendered":"Power Automate: how to verify if a property belongs to an object (apply to SharePoint Date too)"},"content":{"rendered":"<p>We can use this kind of formula (notice the questionmark):<br \/>\n<code>if(empty(variables('params')?[variables('fieldName')]), 'fieldName is not part of the object params', variables('params')?[variables('fieldName')])<\/code><\/p>\n<p>Then it either returns &#8220;fieldName is not part of the object params&#8221;, or the value.<\/p>\n<p>We can use it to check if a date field is empty in a SharePoint List, because when getting the data from the SP List, when the date field is empty, it&#8217;s not in the result returned \u2013 the below code will return <b>true<\/b> if the date field is empty:<br \/>\n<code>empty(item()?['dateFieldNameId'])<\/code><\/p>\n<p>For a Currency\/Number field you need to use <code>string()<\/code> as well:<br \/>\n<code>empty(string(item()?['floatFieldNameId']))<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We can use this kind of formula (notice the questionmark): if(empty(variables(&#8216;params&#8217;)?[variables(&#8216;fieldName&#8217;)]), &#8216;fieldName is not part of the object params&#8217;, variables(&#8216;params&#8217;)?[variables(&#8216;fieldName&#8217;)]) Then it either returns &#8220;fieldName is not part of the object params&#8221;, or the value. We can use it to check if a date field is empty in a SharePoint List, because when getting the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","hide_page_title":"","footnotes":""},"categories":[23,170],"tags":[156,123],"class_list":["post-2282","post","type-post","status-publish","format-standard","hentry","category-debug","category-english","tag-debug","tag-english"],"_links":{"self":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/comments?post=2282"}],"version-history":[{"count":5,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2282\/revisions"}],"predecessor-version":[{"id":2373,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2282\/revisions\/2373"}],"wp:attachment":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/media?parent=2282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/categories?post=2282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/tags?post=2282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}