Let us continue with our previous example of Employee Exit Survey and add conditional branching step to it.
https://nishantrana.me/2017/03/05/using-web-form-to-create-a-simple-survey-in-portal-dynamics-365/
Here we’d add a conditional web form step which will check the response of the user for Work Life Balance question and in case if it false, it shows one more step to the user and asks for the comments.
So, let us first create a web form of type Condition with below details
Type | Condition |
Target Entity Logical Name | Our custom survey entity |
Next Step | Web Form Step when condition is true |
Condition | If new_thirdquestion is true |
Now let us see the details of web form step – third step which we have defined as Next Step for the condition Web Step above.
We have also created associated Web Form Metadata record of the type attribute for defining the label and other properties for the new field named fourth question in our survey form.
Adding label –
Adding Description –
Making field required –
Finally update the Second Web Form Step to point to the Condition Step
We are done with our configuration, now going back to our web page shows the Web Form with all the 3 steps.
Clicking on next with No as the answer for the Work Life balance Question shows the third web form step. Note here we can see the label defined, description defined and also the field is mandatory which we did using Webform Metadata.
Clicking on submit without specifying comments shows the required field message
All the details here
Hope it helps..
3 thoughts on “Using Conditional Branching in Web Form in Portal (Dynamics 365)”