I have a repeater with a Checkbox on a Page. When data is populated in repeater then it has multiple rows.
I want to determine if a row in repeater with Checkbox has value True or FALSE.
I tried to use onValidate function for the check box but it didn’t worked out
The code in the onvalidate is:
checkbox - OnValidate()
IF (Rec.Selected = TRUE) THEN
boolean := TRUE
boolean := FALSE;
where Rec is representing Page.
Here i am checking each check box individually. I have to improve this code. I tried using loop but it didn’t worked out.
Please note that I have a scenario in which if all checkboxes in Repeater rows are selected then I should call another function
The code seems wrong, please take help of a developer to fulfill your requirement OR Please elaborate on what is your actual requirement.
If the repeater has let say data in 3 rows … Each row will have a check box in repeater. when ever user selects/deselects a checkbox in any row in Repeater … OnValidate for that checkbox is called.
Now my questions is how we can use a logic to verify if checkboxes in 3 rows of repeater are checked ?
And the code is posted as a sample …
If I understand your question correctly, I think you want to select/un-select all the check boxes if any one check box is selected/un-selected.
You may use MODIFYALL function on OnValidate trigger of this check box, if this checkbox is a field and not a variable on the page.
Why waste so many lines of code?
Assuming that “boolean” is a boolean variable, then this could do the exact same thing:
boolean := Selected;