Open Form B based on field value in Form A

Open Form B based on field value in Form A

Requirement  

Open another form based on the value entered in the first form.

Use Case  

A course - planning platform wants to design the learning plans based on the learner's current knowledge. If a learner is a working professional, one is asked to enter details about their employment so that their course of learning is different than from a student or a non-working professional.
 
See how it works

Steps to follow  

1. Create the forms with the following details:
Form
Form Link Name
Field Type
Field Name
Field Link Name
Learning Registration
Learning_Registration
Name
Name
Name
Email
Email
Email
Phone
Phone
Phone_Number
Drop Down (Add a few courses to the drop down values)
I want to learn
I_want_to_learn
Decision Box
Are you a working professional?
Are_you_a_working_professional
Working ProfessionalDetails
Working_Professional_Details
Lookup (Learning Registration)
Learning Registration
Learning_Registration
Single Line
C ompany Name
Company_Name
Single Line
Designation
Designation
Address
Address
Address
Number
E xperience
Experience
 
2. Let's create a workflow to execute during the successful submission of the Learning Registration form 
 
3. Add the below code in the Deluge Editor:
  1. if(input.Are_you_a_working_professional)
  2. {
  3. //Set the Learning Registration field value in Working Professional Details forms to the current record ID value
  4.  openUrl("#Form:Working_Professional_Details?Learning_Registration=" + input.ID,"same window");
  5. }
This will open the Working Professional Details form with the Learning Registration lookup value set to the current record ID value.
 
4. Let's create another workflow to disable the Learning Registration lookup field in the Working Professional Details form during its load.
 
5. Add the below code to disable the lookup field:
  1. disable Learning_Registration;  

See how it works