LSID generation for Study datasets

LabKey Support Forum (Inactive)
LSID generation for Study datasets trent  2012-05-20 19:11
Status: Closed
 
Hi Anthony,

1. How do I specify custom configuration to always hide the ParticipantId and SequenceNum columns? Is this columnModel metadata I can specify inline to override what is coming back from the query?

Try setting the config property, on the grid, 'autoSave' to false. It requires the user to hit the save changes button before saving, but aside from it not throwing the aforementioned error, its more user friendly imo.

2. How can I get a listener on the store to auto fill row fields for new records?

Not sure if this is the best way or not, but I tied a beforecommit event to the store, for my use.

store.on('beforecommit', function(records, rows){
    for(i=0;i<rows.length;i++){
        rows[i].values["patient_visit_id"] = patientVisitId;
    }
    }
);

rows[i].values is a JSON object that represents each column/value that is sent to the server to commit to the table.