Note: The reason that the above formula works is due to the optional chaining operator ‘?’. Including this operator is essential because it acts as a “safe navigator.” It checks if a property exists before attempting to access it, and if the property is an empty string or null, it skips it rather than throwing an error. If the chaining operator is omitted, the first parameter will always be used. When creating an expression in Power Automate the chaining operator is automatically added.
As an alternative approach, instead of adding the formula directly into Dataverse, it can be used in a Select action, as below. The output of the Selection action is then used in the ‘Add a new row’ Dataverse action.