Subject: Passing variables to another form using URL.
Here is some older documentation which works fine in R6.
How do you pass variables to another form in the URL? (Notes R4.6)
Field values can be passed to another form in the URL by using the ampersand (&) followed by the value you wish to pass. For example:
/Abc.nsf/+Formname+?OpenForm&Somevalue
To demonstrate, follow the steps to set up an example for R4.6 (R4.5 is below):
(1) Create a form and call it QS1,
(2) add a field named “somevalue” (text, editable),
(3) create an action hotspot, i.e., CLICK HERE TO SUBMIT FORM, using the following formula:
URL :="/yourdatabasename.nsf/"+"QS2"+"?OpenForm&"+somevalue;
@URLOpen
Note: QS2 will be created in a future step (#6),
(4) OPTIONAL…hide the submit button by using the following:
"["<!--button//-->"]" (you will need to hide text), and
(5) save form.
(6) Create another form called QS2,
(7) add a field named Query_String (text, computed for display, hide always),
Note: Use Query_String in the formula window as well.
(8) add another field named “somevalue” (text, computed for display) using the following formula:
@Subset(@Explode(Query_String;"&");-1)
(9) save form and test.
How do you pass variables to another form in the URL? (Notes R4.5)
Modify steps above by doing the following:
(1) Make a copy of QS1 and give it a new name “QS145,”
(2) action hotspot is the same except use “hide when editing,”
(3) do not hide submit button,
(4) create a $$Return field and use the following formula:
"[/"+@Subset(@DbName;-1)+"/ViewName/"+@Text(@DocumentUniqueID)+"]"
where ViewName is the name of your view.
Note:The view must be set up properly, review Tech Note #158546 - “How to Return a Web User to the Same Document that is Submitted.”
(5) save form and test.
You will see an extra step when running R4.5 as opposed to R4.6. Version 4.5 passes the value only from the READ mode and not the edit mode as R4.6.
This is one means to pass a value, others include inheritance, and using other values in the $$Return.