Hello,
I'm building a flow to transfer data from SQL Server to Dataverse. I'm creating contact records and each contact may have a supervisor. If a supervisor exists I want to add a lookup to the new contact record, but if not I want to do nothing. I know how to do this using the conditional actions in flow, but I'd prefer to use an expression in the lookup field for the Add a new record Dataverse action to minimize the business of the flow. Ideally, I'd like something on the order of:
if(equals(variables('id'),''),'',/contacts(variables('id')))
The intent of the above is that when the id retrieved for the supervisor is empty, don't add a lookup, but if there's a value add the contact lookup using that id. The above gives an invalid expression result when I try to apply it. If anyone can help me out, or indicate if this method can't work, I'd appreciate it.
Thanks!