Set & Get Fun

Options
Why does this work for Update Variable but not Add Number? [image.png]When doing an add number I get[image.png]
Some Context:[image.png]Trying to loop through the totals object on calculator that has a set of entries corresponding to entries in an associated list of accounts for which I'd like to add and total (hope that's not too convoluted).

Comments

  • Unknown
    Options
    type in "key" instead of making it a variable accidentally. I've made this mistake too
  • Brian Giometti
    Options
    Thanks , but in this case it is a variable.  I'm pulling keys from the initial object's schema and iterating through them.  But I can relate, I think I've finally gotten into the habit of always clicking the variable name regardless of whether I'm typing, copy/pasting, etc
  • Brian Giometti
    Options
    I don't think it likes me using the original object as the existing variable in add number, the update variable seems to handle it OK
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    Add number requires integers or decimals only to be used. Variables are more flexible and can hold different data types as well as more complex ones like full objects and arrays
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    When using set you are creating an object with a key-value pair... a number can only be a raw integer or decimal
  • Brian Giometti
    Options
    Thanks  makes sense.  Seemed a little odd at the time, but now I get it.  Just to close the loop here's where I ended up.  Couple of variables is all it took to work around.  Added a couple of conditionals to help with null values as well.[image.png]