How to update all values of a control inside a repeater based on another control value outside the repeater?
Last Update: February 02, 2018
Here are the steps on how to do that.
- Open the form in
design mode.
- Add Repeater control to the form workspace and set its ID property to repeater1.
- Add TextBox control inside repeater1 and set its ID property to txtTextbox1
- Add TextBox control outside repeater1 and set its ID property to txtTextbox2.
- Select txtTextbox2
- In the
Rules pane, click on the Add icon to add a new rule, the
Rule Manager dialog will open.
- Add a new rule as follows:
A. Change the
Rule Name as desired.
B. Change the
Rule Type to Action.
C. Change the
Event Type to onChange. Check "Execute if event triggered only on this control".
D. In the
Action section, type the following script:
setValueOfControlInRepeater(txtTextbox1,txtTextbox2) //This will update all values of txtTextbox1 inside the repeater.
E. Click on the
Save button to save the rule.
Note: You can use
Assistance Panel to help you adding functions and related parameters, form variables and form controls to
Conditions and/or
Actions sections. - Test the form by clicking on the
Preview button in the
View Group.