Serialization (like in Agenda Example) and Casting for Num and Dates


Antonio Cambule

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:

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


DecSoft

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!


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.