This is probably a super simple question, but I’m a super simple flow user. After listing records from D365 how would I go about retrieving an attribute value of the first result returned?Michael “Super Simple Flow User” Ochs
This is probably a super simple question, but I’m a super simple flow user. After listing records from D365 how would I go about retrieving an attribute value of the first result returned?
I won’t name the person who suggested the following:
You know who you are, Andrii “Granny’s Moonshine” Butenko, and credit is where credit due – step 2 is actually correct if you only need that one record. I guess step 4 is also correct when you get something right.
The way I would do it:
Let’s say I have an account and I want to find the full name of child contact created last.
Build the query by filtering contacts on the parent account, ordering the results by createdon in descending order (so that the last created contact is on top), then limiting results to 1.
After that, use the following expression to get the full name of the first contact returned.
Note that the query may or may not return any results so we use question mark operator (?) to avoid runtime errors.
To reference null properties in an object without a runtime error, use the question mark operator.Workflow Definition Language schema
To reference null properties in an object without a runtime error, use the question mark operator.
The result is either the full name or empty (if account has no contacts).
The only downside of using the expression (besides being not-exactly-nocode) is that the expression won’t know when you rename the List Records step. Which is why Tip #1247 is important.
Cover photo by Cupcake Media