Hey everyone,
I am slowly moving forward in my airtable scripting journey. What a ride so far.
I would need some advice on best proceeding to finalize my script.
Context:
I created a script triggered from a button, to match client records with potential real estate properties, based on a set of preferences such as the number of bedrooms, the type of view, or some house features.
The script does the following steps:
- Fetch the criteria value from the record used for the automation (the client)
- for each record in my property listings, it calculates a base score for each criterion (0 to 10)
- It applies a weight point system to the criteria scores and outputs a Total property score (normalized from 0 to 10)
- I then slice the top 10 properties and link the IDs to the client record under a specific linked field.
Can't lie, as a no-code person, it took me a few days to get there.
Currently, the criteria weight points are fixed, and stored in a const. This works but some extra flexibility would be ideal.
I am thinking about adding more control for the user when executing the script, allowing him to select the importance of each criterion for the client before running the script, hence using dynamic weight point values.
Any opinion on the best method to apply here?
Option A:
- I could define the weight points in the client record beforehand, and fetch them when executing the script.
Option B:
- I could prompt the user to select the weight point upon triggering the automation. Which I would have no clue how to do.