Basically, I'm trying to retrieve a Contact record from Dynamics CRM. If the record is null/false, I want to do something. If the record is found/true, I want to do something else. Right now, if the CRM record is null, the Flow seems to end with the "The input array was empty" message. If the record is found, it executes the false branch of the condition.
Here is my condition.
Here are some of the statements I've tried.
Seems like something that should be extremely easily to handle. Does anyone know how to get this to work?
Thanks! Any help is much appreciated.
Solved! Go to Solution.
Can you try the expression below in the Condition? You can either do 1=true or 0=false.
@faustocapellanj Thanks for the help. I tried that. Here is the error message.
InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '1' and column '1580': 'The template language function 'length' expects its parameter to be an array or a string. The provided value is of type 'Object'. Please see https://aka.ms/logicexpressions#length for usage details.'.
Based on this comment "You can either do 1=true or 0=false" I'm concerned that Microsoft Flows doesn't have a true or false option for my use case. Is this correct?
Basically, I'm looking for something like this.
if ('List_records' = null)
//Do this other thing.
Move the condition outside the Apply to each step and do the same expression I suggested, but do the 1 instead of the 0 so it can return true. Once you do that, then the Apply to each step will be added automatically to the Yes or No step. Let me know how that goes.
Fausto Capellan, Jr
@faustocapellanj Thank for your continued support on this. Everything now evalutaes as false. I can't get a true result. "The input array was empty" message has gone away. Any other ideas? I can't believe this isn't more straightforward.
Basically, I'm doing a lookup in "List reocrds". Since I don't know if "List records" is going to find anything, then I have the condition.
If "List records" finds a record, then the above condition evaluates as False. If "List records" doesn't find a record, the above condition evaluates as True.
If False, then it hits the False branch. If true, then it hits the True branch.
Hope this helps. For some reason, I can't post an image.
Read the announcement for more information!
Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
The top training and networking event across the globe for Microsoft Business Applications