Saving a new list Christopher Garay  2014-07-14 08:37
Status: Closed
 
Hi all,

Is there a way to create a new list using the data from a user filtered query view using the JavaScript API? I'd like to have a filtered data set available for analysis in multiple folders. Thanks for your help!

Chris
 
 
Greg Taylor responded:  2014-07-15 17:17
I looked for a method within the JavaScript API to create a new list but couldn't find one. Someone else may chime in if one exists. However, once a list exists, you may update its contents using the 'LABKEY.Query.insertRows' function.

https://www.labkey.org/download/clientapi_docs/javascript-api/symbols/LABKEY.Query.html#.insertRows

Greg
 
kevink responded:  2014-07-16 11:37
We don't yet have an API to create a list, but you can create a SampleSet using the LABKEY.Exp.SampleSet.create() API. I'm not sure why it isn't showing up in our public API, but you can see an example in Experiment.js around line 613:

https://www.labkey.org/download/clientapi_docs/javascript-api/symbols/src/api_webapp_clientapi_core_Experiment.js.html