官术网_书友最值得收藏!

Hands on 3 - displaying a feedback form based on conditions

Let's start with an example: Sara Bareilles is working as a system administrator for Universal Containers. She has received a requirement from her customer success manager to develop a feedback form (containing name, e-mail address, and a rating radio button). Her manager wants to display feedback only when the user's age is greater than 18, and he also wants to expose this visual Flow for unauthenticated access (to people who are not Salesforce users).

To develop this Flow, it's necessary that we first ask for the age as user input, then use the Decision element to check the age; if the age is greater than 18, it will display a feedback form or a sorry message. To develop the Flow, follow these instructions:

  1. Navigate to Setup | Build | Create | Workflow & Approvals | Flows.
  2. Click on the New Flow button; it will open the Flow canvas.
  3. Then navigate to the Palette tab, and drag and drop the Screen element on to the canvas; it will open a Screen element window.
  4. Enter the Name field as Enter your age; you can also add description. Under the Navigation Options section, select Don't show Previous button from the drop-down. Optionally, you can add Help Text as well.
  5. The next task is to add a Date field onto the screen to allow your users to enter their date of birth. On the Screen element, navigate to the Add a Field tab and double-click on the Date field, which is available under INPUTS, to add it to the screen. In the Screen overlays preview pane, click on the Date field to configure its settings by filling out the Label, Unique Name, and Default Value fields, and selecting the Required checkbox under the General Info section, as shown in the following screenshot:
  6. Also, add a validation rule so the user can't enter a future date. To achieve this, use the Date_of_birth < Today() formula.
  7. Now, we will create a formula field to calculate the age from the date of birth field. To create a formula, navigate to the Resources tab and double-click on Formula, which is available under the CREATE NEW section, and create a formula as shown in the following screenshot:

Here, {!Date_of_birth} is the screen input element that we have created in step 5.

  1. Once you are done, click on the OK button.
  2. Now we will use the Decision element to check the age.
主站蜘蛛池模板: 闽侯县| 康平县| 桐庐县| 霍林郭勒市| 临潭县| 吉安市| 峨山| 镶黄旗| 滦平县| 九江县| 渑池县| 从江县| 昌平区| 彭泽县| 北宁市| 唐山市| 信阳市| 确山县| 嵊州市| 泰来县| 龙岩市| 平阳县| 石家庄市| 宣武区| 汾西县| 漾濞| 贵南县| 钦州市| 穆棱市| 景宁| 拉孜县| 买车| 雅江县| 潞城市| 广汉市| 舒兰市| 马尔康县| 贵溪市| 简阳市| 安达市| 尉氏县|