Possible to Use Look Up Table for Value Between Two Dates?
I have a set of values I want to reference (via Look Up Table, but open to other suggestions) in subsequent steps and want to retrieve the value associated to a date range. Any ideas on how to best accomplish this? I saw some advance LUT materials but none indicated anything close to this. I also looked at date manipulations and they didn’t cover this scenario.
Intended flow:
Zap runs on schedule (daily, weekly, etc.)
Zap gets current date (pretty format or maybe need to use <date>/<month>/<year>
Zap looks to see if current date falls between a specified range (need guidance here as LUT seems not an option) and fetches the corresponding value which can be passed/consumed in subsequent steps.
@Troy Tessalone Appreciate the suggestion. Never used AirTable but just signed up for an account and setup a base and table. Reading through the docs (a bit) I see I can set more complex formulas and that I’d likely need to use the AND() to compare two separate date expressions (below). I get an error that the formula is invalid. Other tips?
@salesperson
Looks like you may be missing a closing ) at the end.
Also, you may need to use this date format for the mapped values: YYYY-MM-DD
Can take a bit of trial and error to get the formula correct.
Found the missing )… docs seem to show dates as I’m set them, which matches the date syntax in the AirTable. Is that not valid?
And what appears to have the correct parens and quotes in place:
@salesperson
For each AND condition it expects an evaluation such as IS_AFTER(DATE,DATE)=1
Another way to test is by adding a Formula Field to the Airtable base and trying to configure the formula, then once configured convert it to the Zap.
I’ve been experimenting with different syntax in an Airtable formula field and had this mostly working, but I’d expect this to place the crewNumber value in row 3. The syntax passes the formula field as valid. Any hints?
Best to decouple the Formula logic to see what the returned values/results are so you can make sense of why the formula is or is not returned the expected values.
This works in Airtable, but from Zapier, same formula (inserting {} around the column names):
I’m beginning to think this is less of a ‘me’ issue… Support ticket filed with Zapier also.
@salesperson
Try removing the IF condition at the start and end
Wow! First test is as expected… now I gotta get my head around why dropping the IF makes the difference. A good explanation will be useful to future me and others that find this thread… :)
Really appreciate your guidance @Troy Tessalone
@salesperson
The IF condition is returning either a value for TRUE or FALSE.
Whereas by removing the IF condition, it evaluates the AND condition for the specified fields and will return a matching record.
Hi @salesperson!
Great to see that you and Troy worked through this by using Airtable. I wanted to offer an alternate solution that uses Formatter by Zapier and our spreadsheet-style formulas:
A little sneak peek:
There’s a Shared Zap in that article that you can use as a starting point for your own workflow :)
Hi friends! There’s a ton of useful here in this thread and I wanted to pop in and consolidate some of it.
For this scenario, Troy recommended using Airtable (specifically a Lookup Table) as a solution. He also linked this helpful resource from Airtable on advanced features in Zapier.
After fiddling with the formula a bit the OP mentions: