check box refresh problem

Hi ,
I have a list of check boxes. and every check box related to some data.
If i checked then related data will be store in the table, if unchecked then data will be deleted. Now this is working well.
Problem is , if data is in the table then the check box comes with checked otherwise uncheked. But some times some of chekboxes are come with unchecked when the related data is in the table . So , how to solve this problem?

Code you use (quite essential)?
Servoy version?
Java version?
Platform?

suppose I have a table tbl_a and through which I represent check box list.
And I have another table tbl_b in which data will be store by operation on checkbox. And the relation tbl_a_to_tbl_b.
My code

if (tbl_a_to_tbl_b.getSize() > 0 )
{

forms.frm_b.controller.find();
forms.frm_b.fld_1= globals.fld_1;
forms.frm_b.fld_2= globals.fld_2;
forms.frm_b.controller.search();
forms.frm_b.controller.deleteRecord();

forms.frm_b.controller.loadAllRecords()
}
else {

forms.frm_b.controller.newRecord();
forms.frm_b.role_id = globals.fld_1;
forms.frm_b.menu_id = globals.fld_2;
forms.frm_b.controller.loadAllRecords()

}

forms.frm_b.controller.loadAllRecords()

My version

Servoy Developer
Version 3.1-build 404
Java version 1.6.0-b105 (Windows XP)

I am sorry, I would like to help you but reading your questions over and over again I really don’t understand your issue or question.
I hope for you somebody else understands it.

I agree with Marcel that it is very hard to understand your problem. If you put a little more effort in explaining what goes wrong and what you have tried so far, the chances of someone on the forum helping you out will be much much bigger.

If I understand correctly the code you posted gets triggered onDataChange of globals.fld_1 and globals.fld_2 and the problem is that those globals won’t be filled according to the selected record.

In that case you should create a method that fills the globals with the right values and is triggered by the onRecordSelection event.

Now I giving some description.
suppose i have some options like print, preview,mail,reort genaration, create new user etc. Now all these options are not accessable by every user. These options contain a check box. If administrator check some of these against a particular user then that user can access those option which are checked by administrator. Now upto this have no problem.
when administrator check , which options are given to particular user then it will show the checked options which are given and unchecked which are not given to that user .
Now take an example, supose administrator given access wright of mail and print to user 1.
When admin show this form against user 1, he saw mail and print will be checked and other will be unchecked.
Now my problem is, some time it show mail and print is checked and some time both not checked or one of them. But data is in the table.
suppose it show mail is uncheked but mail option access by user 1 because it checked previously by administrator.
So, problem is to refresh check box.

please , any one from the forum help me,
my problem is not solvede

What is the calculation for showing the checkbox?

I previouly describe that if i have some menu like

print, preview,mail,reort genaration, create new user

and i store all these menu in a table,
now i create a calculation which return the menu name and take checkbox field which data provider is the calculation.
now if check box of some menu are clicked against a user then another table store all checked menu against that user.
So, when we saw all menu list against that user , the alloted menu checkbox will be checked and oter will be unchecked.
I done this , but problem is when showing fore against that user then some time it show all alloted menu checked, some time some of alloted menu checked.
But one good thing is that it not show any not alloted menu checked.

Sanneke was asking for the code you are using to show the checks…

suppose I have a table tbl_a and through which I represent check box list.
And I have another table tbl_b in which data will be store by operation on checkbox. And the relation tbl_a_to_tbl_b.
Here tbl_a store all menu list
tbl_b store all accassable menu against a particular user
My code
Quote:

if (tbl_a_to_tbl_b.getSize() > 0 )
{

forms.frm_b.controller.find();
forms.frm_b.fld_1= globals.fld_1;
forms.frm_b.fld_2= globals.fld_2;
forms.frm_b.controller.search();
forms.frm_b.controller.deleteRecord();

forms.frm_b.controller.loadAllRecords()
}
else {

forms.frm_b.controller.newRecord();
forms.frm_b.role_id = globals.fld_1;
forms.frm_b.menu_id = globals.fld_2;
forms.frm_b.controller.loadAllRecords()

}

forms.frm_b.controller.loadAllRecords()

[/quote]

This is going in the wrong direction I am afraid.

Language barrier is the key word here…

subhranild: It will help you (with your issue) and us (to help you out here) when you can create a simple sample solution…