Tip #1246: Use “Get Record” to get all the fields in Flow

TIP UPDATE–after further testing, it appears that this tip may not be necessary. Get record is helpful if you need to get additional details from a related record, but you should not have to do get record after an update trigger.

You create a Flow that runs when a record is updated. Occasionally the Flow fails on one or more step with a template error that reads something like the following:

Unable to process template language expressions for action ‘Check_if_Last_Name_contains_data’ at line ‘1’ and column ‘1823’: ‘The template language expression ‘triggerBody()[‘lastname’]’ cannot be evaluated because property ‘lastname’ doesn’t exist.

You think: of course the lastname property exists–it’s one of the standard fields and it is available to be selected from the field list.

Not so fast–take a look at your failed flow and expand out the when a record is updated. You will notice that none of the fields that do not contain data (nulls) is included in the list.

If you will be referencing fields from the updated record, insert a get record step after the when a record is updated step–then when you reference a field from the record that equals null, the Flow will succeed.

Cover photo by unsplash-logoBrian Taylor

2 thoughts on “Tip #1246: Use “Get Record” to get all the fields in Flow

  1. Hello!

    So the behaviour has changed once again, after you published this tip? Now we do get null values returned from “When a record is updated” ?

    • Joel Lindstrom says:

      Listen to the upcoming Power Platform Tip Show where we discuss this tip—it isn’t that the behavior has changed—after further testing, I found that many things would work with the values from an on update step, but occasionally certain types of filters or steps would fail because value isn’t there. I can’t recreate the exact scenarios where it failed, but if it does fail, doing a get record can help.

Leave a Reply

Your email address will not be published.