Skip to main content

Rounding numbers in universal functions/macros

Answered

Comments

3 comments

  • Official comment
    Yaremi Miranda Lopez

    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:

    https://support.boyum-it.com/hc/en-us/articles/204284198-Guide-Understanding-Macro-Conditional-Commands

     

     

  • Cameron Scully

    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.

  • Yaremi Miranda Lopez

    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)…’);

Please sign in to leave a comment.