Help

Re: Saving color schemes for selection options

503 0
cancel
Showing results for 
Search instead for 
Did you mean: 
data_nugget
4 - Data Explorer
4 - Data Explorer

Hello,

I would like to know if there is a way to automatically use the same colors for single select and multi select options for cohesion and ease of viewing.

For example:

1. If I have a survey, all Yes/No questions will automatically make 'Yes' chips green and 'No' chips red.

2. If I have several multi-select questions with answer options 'Strongly agree, Agree, Disagree, Strongly disagree' 

I can Strongly agree - color green, Agree - pale green,  Disagree - orange,  Strongly disagree - Red

 

Thanks!

 

3 Replies 3

No way to do this I don't think. Your best bet is to duplicate each field once you've set it to the way you want it. It's sort of like a "template" field you duplicate.


Justin Ng
Programme Coordinator at Sistema Aotearoa
https://www.sistemaaotearoa.org.nz/

We're able to update the single select and multi select field option colors by scripting, so you could write a script that you run for every single/multi select field you create: https://airtable.com/developers/scripting/api/field#update-options-async

Hi,  
you can use it to transfer colors and options from existing fields to new. 
Adjust line 1. Ignore red linter mark.

const [T1,F1,T2,F2]=['Source_Table','Colored_Select','Destination_Table','New_Select_Field'];
await base.getTable(T2).getField(F2).updateOptionsAsync({'choices':
  [...base.getTable(T2).getField(F2).options.choices,...(base.getTable(T1).
  getField(F1).options.choices.map( ({id,...rest})=>({...rest}) ))] 
});