Rounding numbers in universal functions/macros
RespondidaIs there a way to round and @STORE or variable within a macro function? We are trying to compare 2 numbers with different decimal numbers and it would help if they could be rounded to a specific number of decimal places.
-
Comentario oficial
Hello Cameron,
In this case, you can use SQL Syntax to round the numbers you need, here is an example of the syntax that you can use:
@STORE3 = SQL(‘SELECT CardCode FROM …’);
You can learn more about variables reading the Macro Conditional Commands Guide that you can download here:
-
Hello,
In our case, the number we want to round is a number that is entered on a sales order line. The order wouldn't be saved/Added yet so we wouldn't be able to query the database for it, we would be using the $[$#.#.#] notation to get the value from the field.
-
Hello Cameron, you can also use the suggested tip and round the value using the Synamic Syntax $[$item.column,type]
For example:
@STORE3 = SQL(‘SELECT Round($[$38.1.15],2)…’);
Iniciar sesión para dejar un comentario.
Comentarios
3 comentarios