Help with Show_if

I am building an app for a restaurant franchise that needs to get their franchisee to add each days of the months turnover/sales listings to the app for the previous month.

So I have an Enum in a form where they can put which months figures they are putting in and then I have 31 columns representing each possible day of the month.

I would like the form to only show relevant days of the month so if the person filling in the form selected February I would remove the 29th,30th and 31st. Provided it isn’t a leap year.

How would I go about this? Should I setup a short form, where I ask for just the name of the store and the month they want to report on and then create a few slices, one for 28 days, 29 days, 30 days and 31 days and then display the slice with the rest of the form according to the answer? Is this the best way?

Do I need to add in another enum or yes/no which asks whether it is a leap year or not or is there a better way of determining this?

is a leap year?:

MOD( YEAR( TODAY() ) , 4 ) = 0 

day 29/30/31 show_if:

IN( MONTH( TODAY() ) , LIST( "x" , "y" , "z" , ... ) )
1 Like