Just getting started on AppSheet and landed a issue that should have an answer.
I have a simple form where I want to capture the pay period (that has ENUM values for each month - Jan, Feb, โฆ Dec).
Now I want the field to have a default value corresponding to the current month.
So if the form is entered on 5/1/2018, the payPeriod field should default to โMayโ.
When the entry is made on 4/30/2018, the payPeriod field should default to โAprโ.
I tried using TEXT(MONTH(), โMmmโ) which is the Google Spreadsheet function.
Didnt work in AppSheet.
I tried using SWITCH(MONTH(), โJanโ, โFebโ,โฆ โDecโ) that didnt work
Any suggestions?
Correct format isโฆ SWITCH(MONTH([DateColumn]), 1,โJanโ, 2,โFebโ, โฆ 11,โNovโ, โDecโ)
In the initial value property try Month(Today()) Which will give you the month as a number by default. To give it to you in โMmmโ format you might have to do a nested IF statement.
A combination of both your responses worked.
Here is the solution:
=SWITCH(MONTH(TODAY()), 1, โJanโ, 2, โFebโ, 3, โMarโ, 4, โAprโ, 5, โMayโ, 6, โJunโ, 7, โJulโ, 8, โAugโ, 9, โSepโ, 10, โOctโ, 11, โNovโ, โDecโ)
Thanks.
Cool! I now know about SWITCH expressions. Thanks @Padman_Kondur and
El problema con esta expresiรณn es que cuando ordenas por meses, lo hace empezando por abril y no por enero Translate
Seems there are many bugs.
At least one i can identify is with SWITCH.
Doesnโt look like it can take more than 5 values.
The following works if I have months up to โMayโ.
As soon I add โJunโ, it gives error.
User | Count |
---|---|
42 | |
29 | |
22 | |
20 | |
15 |