You can try parseInt() to convert a text string that looks like a number to a number.
But that might not be your issue. It looks like you are using the write format for a linked record field, not for a number field. To write to a number field, you just give the number, without the square brackets, curly braces, I’d, etc.
Your screen capture does not show the value for InputQty. The value is collapsed in the top right panel. The console.log() of the three records to create is also collapsed.
Thanks so much!! I updated the format per your suggestion and it looks like we are moving in the right direction, but I am still getting an error and also looks like there are 9 objects being written in the console log (should just be 3 numbers, as you can see – rest are undefined). Any idea what might be going wrong?
What is your level of experience writing code and what is your level of interest in learning to code?
It sounds like there are multiple issues going on here.
there is still an error in the field value, but this is for a different field
the script wants to create more records than you expect.
The issue with the field type not matching the value you provided depends on the actual field type. You can find the write formats for each field type in the scripting reference.
The issue with creating more records than you want is trickier because it isn’t clear how you are getting the quantity. It looks like the length of the productInput, but it isn’t clear how that value is set or what it is. Plus, the screen isn’t good at displaying nulls.