May 30, 2023 03:34 PM
Probably a pretty simple script update here but I'm stumped... Everything just comes back as undefined rather than the value 1.
Solved! Go to Solution.
May 30, 2023 07:20 PM
I believe @Sho’s explanation will work.
The issue is that there are two things named inputVariable: the variable you assign the input.config() to, and the input variable that you created in the left panel of the editor.
You are conflating the two.
Things would be less confusing if you had only one thing named “inputVariable”. Even better would be to have nothing named “inputVariable”.
Name your input variable in the left panel “boatNumber”, then you can use
const inputConfig = input.config()
const boatNumber = inputConfig.boatNumber
There are other ways to do it, but whatever method you choose, it is best to have meaningful names.
But also keep in mind that your boat number is actually a text string and not a number.
May 30, 2023 04:23 PM
I think you are mistaken
In this case. "inputVariable.inputVariable" will yield "1"
May 30, 2023 07:20 PM
I believe @Sho’s explanation will work.
The issue is that there are two things named inputVariable: the variable you assign the input.config() to, and the input variable that you created in the left panel of the editor.
You are conflating the two.
Things would be less confusing if you had only one thing named “inputVariable”. Even better would be to have nothing named “inputVariable”.
Name your input variable in the left panel “boatNumber”, then you can use
const inputConfig = input.config()
const boatNumber = inputConfig.boatNumber
There are other ways to do it, but whatever method you choose, it is best to have meaningful names.
But also keep in mind that your boat number is actually a text string and not a number.