I have an edit form which is connected to a SP-list. One of the fields is of type: Date. Due to the delegation problematic with filtering dates, I have made another column of type number that reflects the date as a number. This is achieved by using this formula:
Set(Tester,Value(Text(DataCardValue9.SelectedDate,"[$-en-GB]yyyymmdd")))
DataCardValue9 stores the date.
When I submit the form I need the the value in my number input to be present in the SP-list. It should be an easy thing to accomplish but I haven't succeeded. This is what I have done:
On start: Set(Tester,0)
Default Value on the DataCard that stores the date as a number: Tester
OnChange DataCard that stores the date: Set(Tester,Value(Text(DataCardValue9.SelectedDate,"[$-en-GB]yyyymmdd")))
So when i change the date in the input, the variable "Tester" change as it should, and the input for the DataCard that stores the date as a number shows the desired number. But when i submit the number column is blank.
I have noticed that if I open the app and submit immediately the number column shows the value "0" as it should since "Tester" was set to that value initially.