Skip to main content

Hi everyone,

I don't know if other people have already discovered this but I learned this today from Zapier support and thought it was worth sharing...

Normally, when you set up a filter, you have to manually type the value of the filter i.e. the number or text you'd like the filter to check. This isn't great if the thing you want to filter is dynamic and the value is different every time.

Wouldn't it be great if the filter let you pick a field from a dropdown menu (a bit like you do within an action step).

Well, apparently you can type in a special variable which will get Zapier to pull the correct variable from the appropriate step.

I explained this a bit clearer in this video hopefully: https://www.loom.com/share/7408dca840a24a439baff062ac0a586a

Again, not sure if I'm late to the game here. But I thought this was pretty cool!


@Andrew_Luhhu were you aware of this?



Why. Did. I. Never. Actually. Test. This 😣 - thanks @paulminors

So, yeh, I've needed this a few times and I've always ended up having to use a Code step preceding to do the actual testing there.

I had previously discovered the trick of copying a dynamic value and pasting it into notepad to get the {{123456__value}} and had gone as far as pasting it into a filter step - but because the editor didn't display it as a dynamic field, I assumed it wouldn't work. I wish I'd tested anyway!

@jesse / @Danvers - this really needs to go in Zapier docs. You're going to save people so many headaches!



@Andrew_Luhhu The reason that we're not keen on making this more of an 'official' workaround is because it's more advanced and you don't get any warnings if it might break (eg if you change a previous step or get different sample data).

I wonder if there's scope for creating some more 'advanced' docs that come with caveats, to help folks like Experts and Superusers. Hmm...

Another thing to add is that there is a feature request to add the ability to use dynamic values in the Filter condition. I don't have a timeline on when we can expect that but if you'd like to be added to the request, drop me a DM and I'll make sure that your vote is added and you'll get an email if/when it's created.



Makes sense @Danvers - I'll file this under 'use with caution' like dynamically referencing sheets/tabs in Google Sheets.

My question, though, why can't you already use dynamic fields in filters? This is about the only place you can't do this in Zapier. I'm guessing the reason is technical - but I can't work out what it might be?



There are some technical considerations, but another reason that the Filter step doesn't have that function yet is that it's been hard to find a way to represent it well within the current layout of the Filter step.

Adding the function requires a redesign of the UI for the step and we want to get that right, which is why it's taking some time.



@Danvers is that the same reason (formater UI redesign) the left side of a filter (and a path filter) step is so confusing. For example if I have 5 formatter steps and I need to filter on one When I select that formatter step it just shows "Output Text" in stead of "Step 5 Formatter Output Text" I've had it many times where I think its grabbing the output from one step when it's grabbing the output from a different step altogether.


Just like @Andrew_Luhhu said this is a different format than in other action/trigger steps and it's only with formatter as far as I can tell. It's quite annoying.


But so is not being able to choose a value from a previous step on the right hand side... thankyou @paulminors for this... I have used copy/paste on the dynamic values and put them in a text document to copy the "settings" of a zap step to another... but never thought of trying this in a filter... Duh... but what a power move now!



@PaulKortman - yes that's pretty much it. I know that the team is working on making this a better experience all round so hopefully they will find a way to wrap up both of these issues at the same time!



Oh boy... Thanks for sharing @paulminors I have been adding essentially a useless code step to accomplish this sort of logic. Always get super frustrated when I haven't been able to select a variable within a filter.

Here's what I have been doing (it's a check to see if this most recent step ID = the step ID in the trigger), something that what you just showed would do just fine and save a step:

image.pngOnly issue that I can see come into play is it makes the automation slightly less modular (in that if you duplicate the zap, you need to update the filter variable since it is hard-coded and won't be updated to reflect the new step ID that exists in the duplicated zap.

Thanks for sharing!

@Danvers +1 on adding some documentation for little known tips and tricks like this (totally fine just listing caveats and such, because that would have saved me a ton of time across the years creating miscellaneous code steps to quite literally just do a "true/false" continue check like the above).

Thanks team!