Error when multiplying a decimal

Options

I get a strange error "Exception: Numbers are required for mathmatical operations."

The number I'm trying to multiply is a decimal - e.g. 0.0002312203989

Any thoughts on what the problem might be?

Best Answer

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Answer ✓
    Options

    Ah yes I see. You are trying to multiply a list (array)


    To apply transformations to a list you will need to iterate through it with a loop. You'll want to use a For Each Loop so you can update each item with your multiplication.

Answers

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    Can you check to make sure that it's not a text data type? This is a common mix-up we see

  • Paul S
    Paul S Member
    Options

    Thanks Michael

    Yeah, I'm sure its decimal. I created a new table and api to be sure.. see below

    am I doing something wrong here?

  • Paul S
    Paul S Member
    edited October 2022
    Options

    Aaah...i was confused because I only receive one item back, but in effect it's still a list

    changed it to single and it works

    thanks Michael!

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    If you just want to do it to a single record, you can either turn the return type from list to single or use a Get Record... you won't have to use a loop in that case. But lists require a loop (even if it's a list of 1)

  • sebaspindu
    sebaspindu Member
    edited March 2023
    Options

    Had the same exact problem but when using an aggreagte !! Very helpful