update one cell in a row (labkey java api) | Jon (LabKey DevOps) | 2017-05-11 14:47 |
Status: Closed | ||
Hello, Using the UpdateRowsCommand, you need to indicate what row you want to update in addition to the specific field for that row. If you look at the API docs here: https://www.labkey.org/download/clientapi_docs/java-api/org/labkey/remoteapi/query/UpdateRowsCommand.html https://www.labkey.org/download/clientapi_docs/java-api/org/labkey/remoteapi/query/SaveRowsCommand.html You'll see the example: //Update Rows Command UpdateRowsCommand cmdUpd = new UpdateRowsCommand("lists", "People"); row = new HashMap<String,Object>(); row.put("Key", newKey); row.put("LastName", "Test UPDATED"); cmdUpd.addRow(row); resp = cmdUpd.execute(cn, "PROJECT_NAME"); This allows the specific row to be updated and just that specific field for that one row. Regards, Jon |
||