Set Enumeration Value To Current Month

1
Hey,   I have an enumeration with months ( like January, February, March, etc.) so a user can choose a specific month in a dropdown. What I want to achieve is that  when the page opens, the enumeration value is selected to the current month.   I know that I can get the current Month with formatDateTime([%CurrentDateTime%] , ‘MMMM’), but that doesn’t help me since I dont know how to set the enumeration value with a string.   Edit: This is how the page looks like currently when opening:     And I want it to look like this:   The months and years are all stored in enumerations. The months from January to December and the years from 2021 to 2026. But I want to set the value of each enumeration based on the current month and year.   Would appreciate any help.
asked
4 answers
1

Or create an split where you compare the string of the currentdatetime to the caption of the enumeration.

 

Use your own formatdatetime code and compare the outcome with the value of the enumeration. If those two match, set the month in your object. Repeat this step 12 more times haha.

answered
1

Hi Nick,
U can Store the Key of the Enumeration in the format of MMMM and Caption as Month Names.. 
u can write an expression like this to get same value
getKey($Month) =formatDateTime([%CurrentDateTime%] , ‘MMMM’),

answered
0

What you exactly want as output?? Name of the month or number of the month???

 

answered
0

Hey Nick, 

I dint get your question.. what you exactly want to do!! can you please elaborate??

answered