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

Creating a collection variable

Collection variables are used to store multiple values of similar data types; for example, a group of e-mail addresses. Once you have populated a collection variable with values, you can use it throughout the Flow.

Here is a business Scenario: Helina Jolly is working as a system administrator for Universal Containers. Currently, she is developing a Visual Workflow and wants to create a variable to store customers' e-mail addresses to send out an e-mail to them.

To create a collection variable in your 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 for you.
  3. Then navigate to the Resources tab and double-click on Collection Variable, which is available under the CREATE NEW section. It will open a window for you, where you have to enter the following details:
    • Unique Name: Enter the unique name. The name must begin with a letter, and use only alphanumeric characters and underscores. Uniqueness applies only to elements within the current Flow. In this case, enter CovEmailAddress.
    • Description: Write some meaningful text so other developers/administrators can easily understand why this Collection variable was created. When you select a collection variable in the Explorer tab, then the description appears in the Description pane.
    • Data Type: This determines which types of value variables can be stored. Select the data type of Text. The available data types for variables are as follows:
      • Text: This is used to store any combination of letters and numbers.
      • Number: This is used to store any numbers.
      • Currency: This is used to store currency.
      • Date: This is used to store the date.
      • DateTime: This is used to store the date with the time.
      • Boolean: This is used to store either true or false.
      • PicklistThis is used to store a picklist value. It supports the ISPICKVAL() function in flow formulas.
      • Picklist (multi-select): This is used to store multi-select picklist values.
    • Input/Output Type: This defines whether a variable is available within the Flow or can also be accessed outside the Flow. Different input/output types are as follows:
      • Private: This variable can be allocated and used only within the Flow.
      • Input Only: This allows you to set a variable at the start of the Flow using Visualforce controllers, URL parameters, or subflow inputs.
      • Output Only: This means that you can access a variable's value from Visualforce controllers and other Flows.
      • Input and Output: This means that you can set a variable's value at the start and access its value outside the Flow.

This will look like the following screenshot:

4. Once you are done, click on the OK button.

For best practice, in this book we will use  Cov as the prefix for a Collection Variable.
主站蜘蛛池模板: 莱阳市| 阿拉尔市| 孝昌县| 乐昌市| 海宁市| 本溪| 蓝山县| 游戏| 南安市| 景宁| 青阳县| 乐业县| 屯留县| 毕节市| 安阳市| 太保市| 嵩明县| 陆河县| 赣榆县| 安宁市| 霍城县| 金寨县| 肥城市| 铜梁县| 嵩明县| 宁阳县| 巴彦淖尔市| 婺源县| 沂南县| 大洼县| 定襄县| 香港 | 松江区| 黄陵县| 宝坻区| 布尔津县| 巍山| 平南县| 定陶县| 叶城县| 三台县|