In ClaySys AppForms a user can pass values to a form to another form using the SetFormValue() Function. Here we are demonstrating how to implement this functionality in ClaySys AppForms.
In order to pass values a user should have a minimum of two forms. So create a form and convert it into a pop up form and another form acting as the parent form where the actions to setvalue occur.
![](https://www.claysys.com/app/uploads/2022/03/NewItem2171.png)
Drag and drop a textbox control into the popup form so that we can see the passed value from the parent form. Save and checkin the form.
![](https://www.claysys.com/app/uploads/2022/03/NewItem2170.jpg)
Now in the parent form drag and drop a button control and set a rule in the form, with the button control as the trigger.
![](https://www.claysys.com/app/uploads/2022/03/NewItem2169.jpg)
![](https://www.claysys.com/app/uploads/2022/03/NewItem2168.jpg)
Add an action in the form so that in the button click we can load the popup form. For that we have a function LoadForm() to load a specified form.
![](https://www.claysys.com/app/uploads/2022/06/NewItem3426.jpg)
Now we have to pass a value to the popup form, for that in ClaySys AppForms we have the SetFormValue() function. So add another action below the LoadForm() function to set value as shown below,
![](https://www.claysys.com/app/uploads/2022/06/NewItem3427.jpg)
SetFormValue have 3 arguments.
- The name of the form to which the value is been passing.
- The Control name where the value is to be passed.
- Finally the value to be passed. Either it can be a string or a value from a control.
The complete rule will be like this,
![](https://www.claysys.com/app/uploads/2022/03/NewItem2165.jpg)
Note: SetFormValue() can only be viewed in WebPart. So add the parent form to the web part.
![](https://www.claysys.com/app/uploads/2022/03/NewItem2164.png)
![](https://www.claysys.com/app/uploads/2022/03/NewItem2163.png)