Forum Discussion
Puh! Apologies, that I have not described everything I had tried before posting.
Among others, I had tried parseFloat as well.
I wonder if you have tried it yourself, jolly good. Pipeline is attached
parseFloat($amount.toFixed(2))
will remove the decimal ‘.00’, so this brings nothing.
As a result you would get: 1000 → “1000.00” → 1000
Again I need to add decimals to 1000 to get 1000.00, NOT to “1000.00”
{
"amount" : 1000.00
}
anyone?
thank you.
toDouble_2022_01_12.slp (5.9 KB)
Actually, It will not. I agree with @viktor_n on this one. This is a validation from the pipeline you attached:
Don’t rely on the preview within the snap, check the actual output after validation.
Regards,
Bojan
- koryknick2 years agoEmployee
omiaye - Please download the attached ZIP file, decompress it, and import the SLP as a new pipeline.
The Sequence snap is pretty self-explanatory. We're just getting the list of years we want records for.
In the Mapper, we create both the Jan and Jul start/end dates as a document with and array containing two objects of start/end dates.
Then we use JSON Splitter so each start/end date is a single document.
Finally, the Filter is used to prevent any future dates (i.e. when we're running in the first 6 months of the year.
As with any solution, there are other ways to solve this, and I'm sure others in the Community can come up with a more concise way to do the same, but I wanted to give you an easily supported and understandable solution.
Hope this helps!