Hi there,
I have a Date Input and a Number Input on my view.
I used the Agenda example to serialize/deserialize data in local storage.
To get the values into the inputs i use:
// For date:
ObjectGetProp "[Item]" "ExpirationDate" "[RecordDate]"
NewDate "[RecordDate]" "" "[TempDate]"
DateToJSDate "[TempDate]" "[ExpirationInput.Value]"
If do not cast the values i get errors.
So, is this the right way to go, do i need to cast them into the
correct types? Is there a an other approach to consider?
thanks and regards
Antonio
Hello Antonio,
In principle, always that we use the "StrSerialize" action, then we must to use their counter part "StrUnserialize" in order to get the proper value. Said that, we only can serialize Arrays and Objects variables. In other words, strings and numbers can be saved without any serialization/unserialization.
If what we wanted is to save the value of an Input Date we can do something like this:
Then, to recover that value and place it again into an Date Input control we can codify something like the below one:
Hope this can help in something!
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.