Skip to main content

performUpsert using field of type decimal does not works correctly, when number is integer

  • June 15, 2023
  • 2 replies
  • 32 views

Forum|alt.badge.img+3

I want to do upsert using field of type decimal as matching field, but it does not work if number is whole integer, like 12 or 12.0. Item was not updated and instead was inserted new one

I know it is possible to use some hack, sending number as a string with exact precision and using option typecast: true, but it would not fit my automation task

 



2 replies

alxwlfe_airbnb
Forum|alt.badge.img+13
  • Participating Frequently
  • June 16, 2023

I haven't tested this, but the documentation for `performUpsert` seems to indicate it only works on 1 record, but it looks like you have 2 records with a value of `12.0` — documentation snippet below:

 


Forum|alt.badge.img+3
  • Author
  • New Participant
  • June 17, 2023

I haven't tested this, but the documentation for `performUpsert` seems to indicate it only works on 1 record, but it looks like you have 2 records with a value of `12.0` — documentation snippet below:

 


That's correct, and if it would work correctly it should find 2 records and throw an error, but instead a new record inserted