Searching with Dynamically Modified Values
Before searching, keyed in values needed to be multiplied, and the search had to be done on a filtered set of records derived from said multipled values
View the solution base hereBase Details
Data Records
table- Each record contains a
Number
value (amongst various other fields that do not concern us at this point)
- Each record contains a
Group Records
table- Records that group together records from the
Data Records
table- For example, assume
Data Records
has 1000 records. - Records 1-50 in from
Data Records
would be linked toRecord 1
inGroup Records
, Records 51-100 toRecord 2
, etc
- For example, assume
- Records that group together records from the
Queries
table- For users to submit new queries with the following data:
Group Records
records to indicate which subset of records from theData Records
table to find- A
Multiplier
value - A
Minimum
value - A
Maximum
value
- For users to submit new queries with the following data:
Scope
The client wanted to be able to create new records in Queries
, and automatically find records from Data Records
that matched the conditions they set.
The conditions were the following:
- The Data Record needed to be linked to one of the linked Grouped Records
- For each Data Record, we would need to generate a
Number to Check
value by multiplying the record'sNumber
by theMultiplier
value the client had set in the query - The
Number to Check
value had to be above theMinimum
and below theMaximum
value that was set
After finding all of these records, the client wanted the following data to be updated into the record in Queries
:
- The lowest
Number to Check
value that was higher than theMinimum
- The highest
Number to Check
value that was lower than theMaximum
- A customized line of text that displayed data from each of the found records
The Solution
We created an automation that would run a script once the client had set the:
Minimum
valueMaximum
valueMultiplier
value- Linked Group Records
The script would:
- Find all the records from
Data Records
linked to the Group Records the client had set - Find the lowest and highest values as mentioned above by going through each record and:
- Multiplying the record's
Number
value by theMultiplier
to generateNumber to Check
- Checking whether this multipled value was above the
Minimum
and below theMaximum
- Multiplying the record's
- Update the original record that triggered the automation with the following data:
- The lowest
Number to Check
value that was higher than theMinimum
- The highest
Number to Check
value that was lower than theMaximum
- The custom text that pulled data from each of the found records
- The lowest
"
Adam’s service is amazing! Not only is he an expert in programming and script writing, but he is also a true problem solver.
He helped me to solve a complex issue in Airtable that had been stumping me for days. After taking the time to explain my issue in more detail, Adam quickly identified the root cause of the problem and provided a clear and concise solution. I was thrilled with the result and grateful for his expertise.
His communication is excellent, and he is always willing to take the time to provide detailed explanations.
I would highly recommend Adam to anyone looking for a talented programmer or script writer. He is a true asset to any team.
Thanks, Adam!