I'm creating new items in an SPO list based on an Excel export from one of our databases. There are three person columns among others. The issue is: the dynamic content is sometimes empty, resulting in an error because Flow still tries to find a user.
1. This seems like a bug to me. If my dynamic content is empty, Flow should simply handle this column as if there was no input at all (it's an optional column)
2. I tried using an if function along with 'null'. Result was that no person was entered into the column even if the dynmic content was not empty.
3. Does anyone know of a simple workaround for this situation?
I have run into this issue in the past and the workaround I used was to create a condition to check if the dynamic content was empty and then run the exact same actions under the if yes and if no paths under the condition. The only difference is, under the path where the dynamic content was empty, I leave the field empty. Flow can handle the field being empty and will in turn leave the SharePoint field empty, but if there is null dynamic content in the field it throws the error that you have seen.
If you post some screenshots of your Flow I can help with the specifics of how to set this up in case my description is difficult to understand.
You can try using the coalesce function for this. In the person column, switch to the expression editor and type coalesce(selectexcelcolumnhere, null)
This expression returns the first non null value and if the person column contains data, it will pass that or else it will pass null.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Somehow my initial message got detected as spam...so now a brief version:
Thank you both for your responses!
@rocamp : I finally found a better way. I used the 'Resolve person' action for each email address, connecting these actions and the next (the create item action) with Configure run after: is successful or has failed. For the person fields in the 'create item' action I used the mail outputs from the respective 'resolve person'. This works in both cases now. So I'll go with that.
@yashag2255 : The coalesce function seems interesting but didn't work for me in this case, either. But I might use it in other cases if Microsoft solves the bug that an empty string or variable as an argument is not treated as null by the coalesce function...
But thanks anyway for your help.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.