Issue with system.db.runPrepUpdate in Perspective

Greetings. I have a flex container that I'll run in an embedded view for our users in our dis-assembly process. Currently when we register a defective part we take to a hold area for a user to determine what parts are scrapped; What parts are ok to use again and what parts weren't affected (Never made it on the part). I've created a table with boolean values that I'm able to change by clicking to determine what's scrap/return/etc.. There's a column in this table called "indx" which is the incident log value that's unique each time a defect is logged. I'm using this indx value in the runPrepUpdate. When I write this in SSMS it works fine, when I write it in the runPrepUpdate it's not working correctly at all. It's trying to pull values from a table instead of a drop down.

Screen:

Script:

ind=self.getSibling("Dropdown").props.value
x=self.getSibling("Dropdown").props.options
query="insert into assy_scrap_logging (component,qty,[action]) SELECT component,qty,'scrap' 
from ASSY_Scrap_Journal where indx = ? and scrap = '1'"		
system.db.runPrepUpdate(query,(ind))

Error I'm getting:

As always any help is greatly appreciated! Thanks in Advance!

You’re wrapping ind incorrectly; the function expects a list, and you’re just wrapping it in parens.
try this:

system.db.runPrepUpdate(query,[ind])
2 Likes

I. am. dumb.

Thank you friend. I’ve only looked at this about 58 times this morning.

2 Likes