Row not updating using updateRows() | la27 | 2019-06-05 09:38 | |||||||||
Status: Closed | |||||||||||
Hello, I have Java script code that says this: LABKEY.Query.updateRows({ schemaName:"lists", queryName :"Reagent Requests", rows: [{"Key": 3, "ClientId": "123", }] }); I am trying to update the Reageant Requests Tutorial Form's row 3's cell named ClientId with 123. I have made sure the keyname is Key but it will not update. It gives me "existing row not found." I put this function in the submitRequest() function found in the tutorial code. function submitRequest() { // Insert form data into the list. LABKEY.Query.insertRows({ schemaName: 'lists', queryName: 'Reagent Requests', rowDataArray: [{ "Name": document.ReagentReqForm.DisplayName.value, "Email": document.ReagentReqForm.Email.value, "UserID": document.ReagentReqForm.UserID.value, "Reagent": document.ReagentReqForm.Reagent.value, "Quantity": parseInt(document.ReagentReqForm.Quantity.value), "Date": new Date(), "Comments": document.ReagentReqForm.Comments.value, "Fulfilled": 'false' }], success: function(data) { // The set of URL parameters. var params = { "name": 'confirmation', // The destination wiki page. The name of this parameter is not arbitrary. "userid": LABKEY.Security.currentUser.id // The name of this parameter is arbitrary. }; // This changes the page after building the URL. Note that the wiki page destination name is set in params. var wikiURL = LABKEY.ActionURL.buildURL("wiki", "page", LABKEY.ActionURL.getContainer(), params); window.location = wikiURL; } }); LABKEY.Query.updateRows({ schemaName:"lists", queryName :"Reagent Requests", rows: [{"Key": "3", "ClientId": "123", }] }); } </script> |
|||||||||||
| |||||||||||