Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

viewAsync - choose a view from a view section?

Topic Labels: Scripting
Solved
Jump to Solution
134 2
cancel
Showing results for 
Search instead for 
Did you mean: 

I've run across a script in our base that uses this code:
let view = await input.viewAsync("Pick a view", "Projects");

Our "Project" Table has 100+ views organized by sections, is there any way to modify the code to limit the input choices to a specific view section? (screenshot: Section=Templates) 

if not, are there other ways to limit the input options using a view naming convention or similar? 

Thanks for any input, I've reviewed this documentation, but didn't find any guideance.https://airtable.com/developers/scripting/api/input

Steve_Kiwi_0-1673478413103.png

 

 

1 Solution

Accepted Solutions

The only filtering for Views I'm aware of is filtering by TYPE (Grid, Kanban, etc...). What may work is creating another table where each Template gets it's own records and where one of the fields is the View ID. Users could then select the template's name from that smaller list of records and the View ID or even just the View name is fed back into the script.

See Solution in Thread

2 Replies 2

The only filtering for Views I'm aware of is filtering by TYPE (Grid, Kanban, etc...). What may work is creating another table where each Template gets it's own records and where one of the fields is the View ID. Users could then select the template's name from that smaller list of records and the View ID or even just the View name is fed back into the script.

@AirBenderMarcus 

Thanks for the reply! I hadn't thought about separating the Templates into their own table, but that should work since our base has grown to a point where we probably shouldn't keep templates and live records in the same table.