The refreshDate (and other metadata shown in data views) is stored in what we refer to as an ontology property and is not easily accessible using handwritten SQL. Perhaps a better option is to use the client API that the data views panel uses to edit these properties, it would require a little bit of javascript code to first query the datasets you wanted to update the cut date for, and then using the entityId for each dataset as a key, use the editView API to update the date. Here is a sample piece of code (with the entityId hardcoded):
Ext.Ajax.request({
url : LABKEY.ActionURL.buildURL('study', 'editView.api'),
method : 'POST',
params : {
refreshDate : '2012-04-16',
entityId : '6dd43fa6-43dd-102f-9120-7270029090a0',
dataType : 'datasets'
},
success : function(){
},
failure : function(response){
Ext.Msg.alert('Failure', Ext.decode(response.responseText).exception);
},
scope : this
});
To query for the dataset information, use the LABKEY.SelectRows API on the study.datasets table:
LABKEY.Query.selectRows({
schemaName : 'study',
queryName : 'Datasets',
columns : ['Label', 'EntityId'],
success : function(data, response, options){
}
}); |