Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Desk Flow variable does not have all properties when the source SharePoint Item has blank value

Posted on by 37
Context: Desk Flow (not Cloud Flow)
Goal: Get a SharePoint List and iterate through the list doing some action
Pseudo Code
  • 'Get items' -> output variable SPListQueued
  • 'For Each' CurrentSPItem in SPListQueued.value
  • If CurrentSPItem.E1 is not blank ... 
Problem: When SharePoint item's E1 column is blank, the 3rd line gets an error "Property E1 does not exist in CurrentSPItem" . 
The flow works well when an item does have a value in 'E1' column. This means the set of properties of the loop variable (CurrentSPItem) is different every time, depending on whether the original SharePoint List item had values in the fields or not. This is ridiculous. How do I write code inside the loop when a loop variable has different properties set every time? I asked Github Copilot this question. This was a its response: 
 
"In Power Automate Desktop, the behavior you described where a column with blank values results in the absence of the property in the variable receiving items is indeed a known behavior. This can be challenging to handle, especially when you expect all properties to be present regardless of whether they have values or not.

To handle this situation, you can use a combination of actions to check for the existence of the property and assign a default value if it is missing. Here is a step-by-step approach to handle missing properties:
1.    Get Items from SharePoint List:
2.    Loop Through Each Item:
3.    Check for Missing Property:
•    Use an "If" condition to check if the property exists.
•    If the property does not exist, set a default value
."
 
I sighed but kept trying to overcome this limitation, following Copilot's recommendation. But soon I realized the Desk Flown Designer did not have any way to check whether a variable's property exist or not (IsBlank() did not work if you wondered). So frustrating. How do you guys work around this? 
Categories:

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,532

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,050

Leaderboard