First time poster and a newcomer to Power Automate but come from a programming background.
I'm building a flow to validate and update information in a Sharepoint list - it's for logging and tracking the progress of Asset Purchase Requests but that's largely irrelevant. Inside the flow is a condition check to make sure all the information needed to advance the status to Requisitioned is present. If this fails a string of errors is built up to provide the reasons for failure to the user in an email. The check on the supplier variable is returning a false when it should be true. My diagnosis is as follows:
1. Supplier variable initialised:
This is set further on in the flow after Get Item retrieves the Sharepoint List item the flow is running on and an optional input at the beginning of the Flow using Input boxes in the triggering event (For a Selected Item)
It is possible for the supplier to be left empty although this causes the validation on the item to fail (legitimately) here:
A variable storing all the possible errors is appended to in order to provide feedback to the user about the reasons for the flow failing. In the following, a check on the Supplier variable is made (NB: In this example the Cost price is also 0 so it fails for multiple reasons):
However, when I run the flow despite the Supplier variable being set to Null (here we can see it being set by the flow.)
When the check is made to fill the error message it doesn’t recognise the variable as being set to null and therefore doesn’t populate the error message string variable.
The Supplier variable is empty yet the IF supplier = null condition returns false. Help! What am I missing here?