Was a solution reached on this account? I am trying to do something similar, but I am only getting NULL as a result. Unless I am missing something, I have all the necessary names matching between my update query, params, and script.
This is my 'onActionPerformed' script for my button.
def runAction(self, event):
personPerformingWork = self.getSibling("PPW Dropdown").props.value
firewatch1 = self.getSibling("FW1 Dropdown").props.value
firewatch2 = self.getSibling("FW2 Textfield").props.text
area = self.getSibling("AOW Textfield").props.text
typeOfWork = self.getSibling("TOW Textfield").props.text
approvedBy = self.getSibling("AB Dropdown").props.value
expirationDate = self.getSibling("DateTimeInput").props.value
timeInitiated = self.getSibling("DateTimeInput_0").props.value
timeFinished = self.getSibling("TF DateTime Picker").props.value
params = {
personPerformingWork : personPerformingWork,
firewatch1 : firewatch1,
firewatch2 : firewatch2,
area : area,
typeOfWork : typeOfWork,
approvedBy : approvedBy,
expirationDate : expirationDate,
timeInitiated : timeInitiated,
timeFinished : timeFinished
}
system.db.runNamedQuery("updateHotWorkRecordsTable", params)
Here is the query I made to create my db table:
CREATE TABLE hotWorkPermitRecords (
personPerformingWork TEXT,
firewatch1 TEXT,
firewatch2 TEXT,
area TEXT,
typeOfWork TEXT,
approvedBy TEXT,
expirationDate DATETIME,
timeInitiated DATETIME,
timeFinished DATETIME)
Here is the query I made to insert the relative info I need.
INSERT INTO hotWorkPermitRecords (personPerformingWork, firewatch1, firewatch2, area, typeOfWork, approvedBy, expirationDate, timeInitiated, timeFinished)
VALUES( :personPerformingWork, :area, :typeOfWork, :approvedBy, :expirationDate, :firewatch1, :firewatch2, :timeInitiated, :timeFinished)
Here are the params I set up.
I am getting NULL on my rows.
Any input would be appreciated. Thanks!