14
Views
5
Comments
Solved
Server Action compilation error
Question

I wrote a file size formatting tool, but there was a problem compiling, I don't know what the error is, please help me analyze it, thank you.

the Size is input parameter,Data type is Long integer; the SizeFormatText is outout parameter,Data type is Text.

I uploaded the module file

ToolData.oml
2025-08-22 10-19-44
Pramod Jain
 
MVP
Solution

Hi Yi Wang,

What Jorge mentioned is correct , i did some changes in the oml and is working fine. Instead of evaluating the GB and TB value by multiplying i took two variable and assigned the calculated value as default which is working fine .

Please refer to the updated oml.


Regards,

-PJ-

ToolData.oml
2019-12-30 08-06-41
Yi Wang

Pramod Jain wrote:

Hi Yi Wang,

What Jorge mentioned is correct , i did some changes in the oml and is working fine. Instead of evaluating the GB and TB value by multiplying i took two variable and assigned the calculated value as default which is working fine .

Please refer to the updated oml.


Regards,

-PJ-


Thanks, it works fine

2019-09-24 18-41-25
Jorge Martins
 
MVP

Hi Yi Wang,

I believe it probably has to do with the data type that the outcome of a multiplication has... if * is used with two integers the output will be an integer, if it is used with an integer and a long integer then the output is a long integer. That outcome of that last if/multiplication cannot be represented as an Integer (and as such overflows).

If you store the TB value in a Long Integer local variable it should work.

Can you try it?

2019-12-30 08-06-41
Yi Wang

Jorge Martins wrote:

Hi Yi Wang,

I believe it probably has to do with the data type that the outcome of a multiplication has... if * is used with two integers the output will be an integer, if it is used with an integer and a long integer then the output is a long integer. That outcome of that last if/multiplication cannot be represented as an Integer (and as such overflows).

If you store the TB value in a Long Integer local variable it should work.

Can you try it?

I understand, thanks =)


2025-08-22 10-19-44
Pramod Jain
 
MVP
Solution

Hi Yi Wang,

What Jorge mentioned is correct , i did some changes in the oml and is working fine. Instead of evaluating the GB and TB value by multiplying i took two variable and assigned the calculated value as default which is working fine .

Please refer to the updated oml.


Regards,

-PJ-

ToolData.oml
2019-12-30 08-06-41
Yi Wang

Pramod Jain wrote:

Hi Yi Wang,

What Jorge mentioned is correct , i did some changes in the oml and is working fine. Instead of evaluating the GB and TB value by multiplying i took two variable and assigned the calculated value as default which is working fine .

Please refer to the updated oml.


Regards,

-PJ-


Thanks, it works fine

2025-08-22 10-19-44
Pramod Jain
 
MVP

Good to hear it solved your problem.

Regards,

-PJ-

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.