Is there a Math Functionality of Outsystems to automatically round up

Is there a Math Functionality of Outsystems to automatically round up

  
Is there an equivalent Math.Ceiling from .NET to Outsystems? Outsystems has a Round functionality but it does not have an option to automatically round up the value.
Check the forge if there are already some components.
Out of the box it isn't there.

otherwise create an function yourself :)
Trunc(value) + if (Value = Trunc(Value), 0, 1)

EDIT: Never mind :)

EDIT2: If you have a known number of digits, you can do Trunc(value + 0.99) (where you need the number of 9s as per your number of digits).
Hi Lawrence,

You can easily create an extension for this on Integration Studio. The outsystems' built-in functions contains the most common functions, but everything else you can extend (and that is the purpose of the IS Tool of platform). You could even create an extension that contains all the math functions you need and reuse this in all your future projects.

Hi looking on your comments here and looking in this 


Trunc(value) + if (Value = Trunc(Value), 0, 1)

Do you have any idea to do a RoundUP but with 1 decimal digit?

Like this: RoundUP(12.22,1) = 12.3

Thank you


Nuno Oliveira wrote:

Hi looking on your comments here and looking in this 


Trunc(value) + if (Value = Trunc(Value), 0, 1)

Do you have any idea to do a RoundUP but with 1 decimal digit?

Like this: RoundUP(12.22,1) = 12.3

Thank you


The fastest way? Multiply by 10, Roundup, Divide by 10 :)


Hi Nuno,

Great idea…

  • First I did a normal round to 2 decimals;

  • Then *10;
    Trunc(value) + if (Value = Trunc(Value), 0, 1);

  • /10;

I’m getting the expected results!

A very simple idea but very useful.

I didn’t spend time to think about it, I guess that appear immediately this solution in your head!

For that, Thank you so much!

Kind regards,

Nuno Oliveira








This is the extension you want:

https://www.outsystems.com/forge/component/516/trigfunctions/

Don't work hard to reinvent the wheel! :)

J.Ja

Hi Justin,

Thank you for the information.

Kind regards,

Nuno Oliveira