- Learning Salesforce Visual Workflow and Process Builder(Second Edition)
- Rakesh Gupta
- 489字
- 2021-07-09 20:57:40
Adding a choice to a Flow
Now we are going to add the third field; that is, Rating. To add a Choice element, follow these instructions:
-
For rating, we will use the Radio Buttons field. Double-click on the Radio Buttons field, which is available under the CHOICES section. In the Screen overlays preview pane, click on the Radio Buttons field to configure its settings by entering Label, Unique Name, Value Data Type, the Required checkbox, and Default Value, as shown in the following screenshot:
-
Under the Choice Settings section, create a new choice by expanding the CREATE NEW list and then clicking on Choice, as shown in the following screenshot:
- A new window will pop up where you have to enter Label, Unique Name, and Value Data Type. For Stored Value, use 1 and uncheck the Show Input on Selection checkbox, as shown in the following screenshot:

- If you leave Stored Value blank, then, in runtime, if the user leaves a choice blank or unselected, its stored value is set to null. If you select the Show Input on Selection checkbox, then the user input field appears below the choice option. This option is not available if the choice's data type is Boolean. Repeat the same process and create choices 2, 3, 4, and 5, and use 2, 3, 4, and 5 as the stored values, respectively, as shown in the following screenshot:

- Use Add Choice to add multiple choices.
- Once you are done, click on the OK button.
You can also create a choice from the Resources tab, double-click on Choice, which is available under the CREATE NEW section, and use it with radio buttons, drop-down lists, multi-select checkboxes, and multi-select picklists as Choice.
- The final task is to connect all the elements using connectors. As we are using the Decision element, when you connect the Decision element Check Age to the Screen element Feedback form, you will get an option to select the outcome. In this case, select Greater than 18, as shown in the following screenshot:

- Navigate to the element that you want to use as the first screen in your Flow. Now, set the Screen element Enter your age as the Start element, as shown in the following screenshot:

- Save the Flow with the name Displaying feedback form based on age and click on the Run button to test your Flow. Now, enter any date on the screen:

- Once done, click on the Next button, as shown in the preceding screenshot. If the age difference is greater than 18, then it will display the feedback form, as shown in the following screenshot:

- Finally, click on the Finish button and it will redirect you to the first screen. We will discuss the concepts related to exposing the Flow for unauthenticated access in Chapter 3, Manipulating Records in Visual Workflow.
推薦閱讀
- 中國新股民必讀手冊(2015年最新版)
- Microsoft Dynamics GP 2016 Cookbook
- Magento 2 Cookbook
- Mastering System Center Configuration Manager
- Securing Hadoop
- 陜西國家統計調查專題研究集萃(2006—2015)
- 中國政府統計問題研究
- 審計全流程實操從入門到精通
- 從零開始學房地產會計
- 成功通過PMP(第3版)
- Big Data Analytics with R and Hadoop
- 內部審計情景案例:理解審計行為,辨析審計決策
- Building Dashboards with Microsoft Dynamics GP 2016(Second Edition)
- 統計學理論前沿(谷臻小簡·AI導讀版)
- Force.com Tips and Tricks