Is there any function which tells the type of variable?

Is there any function which tells the type of variable?

  

Is there any function which tells the type of variable?

OutSystems is a STRONGED TYPED language.
All variables must have its type defined.
This means that you, as a programer, always knows the type of a variable.
So, I don't know any function that return the type of a variable (in system actions), and never had the need to one :)

Cheers,
Eduardo Jauch 

Hey Lovish, I would love to hear about your use case! Can you tell why do you need to know the type of a variable?

Pedro Cardoso wrote:

Hey Lovish, I would love to hear about your use case! Can you tell why do you need to know the type of a variable?


Because i want to perform the built in validation at server side even if validation is " Client and Server"

Lovish Goyal wrote:

Pedro Cardoso wrote:

Hey Lovish, I would love to hear about your use case! Can you tell why do you need to know the type of a variable?


Because i want to perform the built in validation at server side even if validation is " Client and Server"

i have doubt , if our validation is client and server side can we check the built in validation at server side again? if you know please let me also know


Hi Lovish,

At server side, you know the type of variable. You know if it is text, or date, or currency.

Because it wad you that defined the variable type.

At server side you will check if the values are in the range you expect. If not, you will mark the input valid as false. In the end, you will check the form and will decide if can or cannot do the action.

Cheers

Eduardo Jauch

Answering your last question...

The Client & Side validation perform only two verifications. It see if what the user typed can be converted to the variable's data type associated with the input. And it verify if a mandatory field has something in it.

If both tests pass for all the inputs in the form (page, really), than the action is called and you can perform, server side, personalized validations.

So, yes, you can perform validations server side even if you use Client & Server validation (than the "Server" in Client & Server).

Cheers

Eduardo Jauch

Seems that Eduardo Jauch already provide the answers. Is that OK Lovish?