Results mapping returns different results in preview vs runtime

I have a flow with a lookup and the results mapping are defined as shown below.

The next step is a lookup with an input filter so it only executes if the account_matches field = 0. The 2nd lookup does a lookup with different filter criteria, and the results mapping are defined exactly the same. The issue is that the account_matches field seems to get set to 0 after the 2nd lookup, even when the 2nd lookup is skipped. However, the lookup_accountid does not get set or cleared. I have verified this behavior by forcing an error between the 2 lookups, and then re-running and forcing an error after the 2nd lookup. Why would either field get affected by the results mapping if the step is skipped?

On imports, an ignored record from an input filter skips everything up to the postSubmit script. On lookups, an ignored record from an input filter skips everything up to the results mapping. The reason is that there are other use cases where you actually want to know which records were ignored and which weren't. In the response mapping, we give you an ignored true/false flag that you can use to do additional filtering later.

You could do something like this, I think:

{{^if ignored}}{{#if data.length}}true{{/if}}{{/if}}

1 Like

Tyler,

Thanks for the tip! I still get tripped up by the places that support handlebars but don’t show any indicator. I used the expressions below, and the fields are only updated if the step is not skipped/ignored. Now it behaves exactly as I need in this scenario.