Hello,
I am currently using the rbf_setChecked() client side function provided by Rollbase and I noticed that on programmatically setting a checkbox to its checked state, it doesn't fire the onchange event of the field. Is this how it is supposed to be work? Kindly let me know how I can trigger an onchange for that field programmatically.
Cheers.
Iram
This has been fixed in the 4.3 release, thus available in the latest release too
Regards,
Saras
Hi Iram,
I am not able to reproduce this scenario. I have used the following code.
rbf_setChecked("CheckBox",true);
And I am able to trigger the function which is defined in onChange event of checkbox field . Please let me know which version of Rollbase you are using. I have tested in Rollbase 4.1 Private Cloud.
Regards,
Shiva
Hello Shiva,
This doesn't work properly on a set of checkboxes i.e. group of checkboxes. Please try the same on a group of checkboxes and let me know if you can't find the issue.
Version: 4.0.4.0
Cheers.
Iram
Are you clicking on it manually or performing the click programmatically? Please refer to my question again: rbf_setChecked() and programmatically.
Cheers.
Iram
Hi Iram,
For my second comment I haven't used rbf_setChecked() API , since this API can be applied only for a checkbox field and not for group of checkboxes. Please let me know how you are applying rbf_setChecked method on group of checkboxes.
More details on rbf_setChecked() API
documentation.progress.com/.../index.html
Regards,
Shiva
Hello [mention:efd18cd3210243c3a2645cbe9409d974:e9ed411860ed4f2ba0265705b8793d05],
Thanks for your reply. It doesn't explicitly specify in the documentation that you cannot apply it on a group of checkboxes. I am getting all the corresponding checkbox ids from their respective codes using rbf_getIdByCode() function and the way I am trying to perform rbf_setChecked on a group of checkboxes is given below. Let me know if there are any questions.
Cheers.
Iram
// I would like to select all the checkboxes var checkboxArray = [1,5,10,25,50]; // 1,5,10,25,50 are the checkbox codes for each checkbox item for(var y = 0; y < checkboxArray.length; y++) { // Getting all the ID's of the checkbox items from their codes rbf_getIdByCode("checkBoxTestObject", "checkboxArr", checkboxArray[y], function task_IdCallback(returnedID){ rbf_setChecked("checkboxArr_" + returnedID, true); }); }
Hi Iram,
Thanks for sharing the code. Yes "onClick" event is not firing when group of checboxes field is used. I will raise a defect for this and let you know ETA very soon.
Note: If you are trying to check the single value in checkbox group its better to use rbf_setFieldValue(fieldname, value) API instead of rbf_setChecked().
Regards,
Shiva
Thanks Shiva for confirming this. Unfortunately I am selecting all the values in that checkbox field and would like to use rbf_setChecked() on all those fields in this case. Would this fix be made a part of V4.2 release? Kindly let me know.
Cheers.
Iram
Hi Iram,
The defect#38813 is expected to be fixed in Rollbase V4.3, which is scheduled on first week of July.
Regards,
Shiva
Hi [mention:efd18cd3210243c3a2645cbe9409d974:e9ed411860ed4f2ba0265705b8793d05] ,
Has this been fixed in the latest release?
Iram
This has been fixed in the 4.3 release, thus available in the latest release too
Regards,
Saras