How to convert generic type to decimal type?

Good day,

I encountered this error, Operator '/' cannot be applied to operands of type 'Decimal' and 'Generic Type'. Anyone how can fix this error? it is possible to convert generic type to decimal type? Thanks in advance!

Hi,

I didn't get error with demcimal by using / operator have a look at the screenshot below:



Please look at the datatype of columns in your expression.

Regards,

Manthan Shah.

Hi Robert,

Outsystems doesn't have a "Generic Type" data type, so I'm not sure how you managed to get that message :).

What are the types of the two variables that you are using in this expression?

Manthan Shah wrote:

Hi,

I didn't get error with demcimal by using / operator have a look at the screenshot below:



Please look at the datatype of columns in your expression.

Regards,

Manthan Shah.


Hello sir, actually the data type of that expression are different, YTDACTUAL (Decimal type) / YTDLAstYear(Generic Type) - 1


Aurelio Junior wrote:

Hi Robert,

Outsystems doesn't have a "Generic Type" data type, so I'm not sure how you managed to get that message :).

What are the types of the two variables that you are using in this expression?

Hello sir, actually the data type of that expression are different, YTDACTUAL (Decimal type) / YTDLAstYear(Generic Type) - 1


The "Generic Type" usually indicates that you're trying to point to a Structure instead of an actual field. What happens when you write YTDLAstYear and then a period?

Can you show us how you created the YTDLAstYear variable?

Have you tried do this YTDLAstYear.value? Since generic type normally refer to a structure.


When you create a structure and use that structure in a variable to acess taht value the name of the variable is not enough. You allways need to get the value of that structure.


Eg:

counter = integer structure

Counter.Value = return the value


BR