Jul 02, 2021 06:25 PM
Hello everyone,
Tinkering with my garden automations and I have seasons on my mind. There’s a couple of items I’m working on and thinking about, and figured I may as well post my questions here to help advance my Airtable skills.
Firstly, spending time with a Switch statement, is it possible to stack cases? For example;
SWITCH(Month{Date}
,1,"Summer"
,2,"Autumn"
,3,'Autumn'
,4,'Autumn'
,5,'Winter'
,6,'Winter'
,7,'Winter'
,8,'Spring'
,9,'Spring'
,10,'Spring'
,11,'Summer'
,12,'Summer')
SWITCH(Month{Date}
,[1,2,12],"Summer"
,[3,4,5],"Autumn"
,[6,7,8],'Winter'
,[9,10,11],'Spring')
And what are peoples thoughts on having rolling seasons within a recurring calendar? Not too sure about this one though, trying to map it out still, so perhaps it’s more of a base design question. :thinking:
DATETIME_PARSE(DATETIME_FORMAT({Recurring Date},'MM/DD')&"/"&YEAR(NOW()))
Solved! Go to Solution.
Jul 02, 2021 06:47 PM
No, it is not possible to stack cases as in your second example. Your first example should work fine.
Jul 02, 2021 06:47 PM
No, it is not possible to stack cases as in your second example. Your first example should work fine.
Jul 06, 2021 07:19 AM
@Karlstens If @kuovonne provided the answer you were seeking, please mark her comment as the solution to your question. This helps others who may be searching with similar questions. Thanks!
Jul 06, 2021 08:47 PM
Thanks Justin, if as a Community Leader, you have the ear of Airtable Devs, could you shuffle this to them for comment? Would make life easier if we could support a range within a Switch Statement. One day I’ll find to explore this further with an Automation script.
Jul 07, 2021 12:02 AM
Unfortunately I don’t have the devs’ ears, at least not in a way that can influence any of their work. The “Community Leader” badge just means that a) I talk a lot, and b) some of it makes sense. :winking_face: