Editing Record Question

I know I must be overlooking something very simple. I have a table view that displays 4 fields, one of which is a checkbox. I want the user to be able to select records from a large list and have only those records they’ve selected show in a list on a different form. When I click the checkbox field, the “e” shows me I’m editing a record. I have to click off of the form or click one of the buttons to get the “e” to go away. I’ve tried databaseManager.saveData(). Any suggestions? What am I doing wrong?

Nicholas Dunn
E-Automation Systems

Hi Nicholas,

Perhaps you can put a onDataChange() method on this field that saves the data.

Hope this helps.

Hi Robert,

I’ve tried onDataChange() method and get the same result. Am I going about this the total wrong way? Should I not have the dataProvider for the checkbox field be a DB field? I tried a form variable that could pass the “1” or “0” depending if the box is checked or not, but when I check one box all the boxes on the form show a check.

Yeah, I was thinking last night that the onDataChange might not work because it’s triggered before the actual save.
Try to use an onAction event instead. I know this works in a normal view, not sure if it behaves the same in a table view.

Hope this helps.

Table view just doesn’t want to play ball. The onAction still gives me the “e” in table view, but in record and list view the onAction fixes my problem. Are table views supposed to act differently? I like the look and sorting power of the table view, but guess I can use a list view and do my best to emulate a table view. Robert, your help has been greatly appreciated!

and what happens, if you use: databaseManager.saveData() as a last line, in the onAction and/or onDataChange?

HI,
I have this problem as well, databaseManager.saveData() does not seem to effect the ‘e’, only clicking some where on the form does it which is really painful.

Is it possible to tell ```
databaseManager.saveData()


databaseManager.saveData(some_record)
databaseManager.saveData(some_record_index)


or 

as a feature request could databaseManager.saveData return the record as a argument with including changes, instead of bolean true/false.
something like the below example would be great, at least that way we could see which record has been effected and validate the result.

var vUpdatedRecord = controller.saveRecord(some_record_index){
if(data == something){
//all good
} else {
//show a error
}

Anyway just my 5 cents worth. <img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" />

Harjo:
and what happens, if you use: databaseManager.saveData() as a last line, in the onAction and/or onDataChange?

Hi Harjo. The only thing my method does is databaseManager.saveData(). Table view is the only view that it doesn’t get rid of the “e”.

wvitpr:
HI,
I have this problem as well, databaseManager.saveData() does not seem to effect the ‘e’, only clicking some where on the form does it which is really painful.

Is it possible to tell ```
databaseManager.saveData()




databaseManager.saveData(some_record)
databaseManager.saveData(some_record_index)


D

Hi wvitpr. According the this sample code, you should be able to tell saveData to save a specific record.```
databaseManager.saveData(foundset.getRecord(1));//save specific record