Can we have global constants on client side?

Hi there,

Can we have global constants on client side in Mobile app?

Solution

You can use site properties put they have to be wrapped in a server action to be accessible on client action. Disadvantage is you need to be online to use it.

Or you create a local entity called global constants with on record where each attribute represents a global constant.

Or you create a client action that used JavaScript to add a variable to browsers window object. and another client action to get the value from browser's window object.




Solution

Thanks very much!

Hi Yatima,

Just to present another option. You can use this component.

Regards,

Marcelo

Daniël Kuhlmann wrote:

You can use site properties put they have to be wrapped in a server action to be accessible on client action. Disadvantage is you need to be online to use it.

Or you create a local entity called global constants with on record where each attribute represents a global constant.

Or you create a client action that used JavaScript to add a variable to browsers window object. and another client action to get the value from browser's window object.





Can we have global constants on client side from the beginning?

I think the three write on client side after app starting.

Marcelo Ferreira wrote:

Hi Yatima,

Just to present another option. You can use this component.

Regards,

Marcelo

Thanks! I'll try it.