When you define steps within a process, you insert fields to handle input, output, or other variables that you might need to receive from a service or pass to another step in the process. Each of the fields you add has a set of field properties that you can configure to determine the field source, the formatting, display properties, and list handling.
For some fields, you can also use the Expression Editor to define complex formulas that determine the field values and other attributes.
The topics in this section describe the options in the Field Properties dialog and the kinds of queries that you can write for use with field properties.
Controls in All Many or Some Field Properties Dialog
Most Field Properties dialogs have the following controls:
•Default Value: Sets a default value for the information being displayed. Your choices are Content (object type), Field (has the object type), Formula, and Screen (user specified object).
•Display Fields: Names the fields to be displayed in columns and the order in which they display.
•Field: The name of the field from which the Field Properties dialog was invoked.
•Height (rows): Sets the number of rows that will be displayed.
•Hover text: Text that is displayed after a user places the cursor over the field.
•Reference To: The type of object to which the field applies. You cannot change this value--not in all dialog boxes.
•Required: Click this checkbox if this value must either be entered or cannot be deleted and not replaced.
•Show List: Defines the way in which objects are located.
•Width (%): Sets the width of the displayed information as a percentage of the width of the process.
Show List: Advanced Query
Selecting Advanced Query lets you finely tune the information retrieved for the list.
After the query executes, the default action is to return a list whose values are object IDs; the list also has the name field for display.
The source for each of the query's four parameters can be Content, Field, Formula, or Screen. In almost all cases, the source is Content. The items that you can set are follows:
•Object Type: The object type upon which the query executes.
•Where Clause: Enter an SQL WHERE clause. The text you enter here does not include the WHERE keyword. Here, Content means you will write the WHERE clause, Field means that the field contains the WHERE clause, etc.
•Display Field: Set a value here to return a field other than the current one. Process Designer will retrieve this data, and then display it within a picklist. If you do not specify a field, Process Designer uses the namefield (the first one, if there is more than one).
•Value Field: Returns a different value than what Process Designer would use by default. If you do not set a value field, the ID of the returned object is used.
Advanced Technique: You could use an advanced query to create a step that displays the query's results within a step. You might want to do this in a different "testing" guide.
Show List: Custom List
Selecting Custom List let you enter your own list of values. For example, you might individually type the names of the New England states. When the process displays, the user sees the items you enter in a picklist.
You must separate items from one another using a comma (",").
Notice that you can also set a Default Value.
Show List: List Child Objects
Use related (or child) objects in the query. While similar to using related objects within fields, using List Child Objects is simpler as you do not need to specify the query's condition.
After you select List Child Objects, you also need to specify the child's object type. Your choice for source is automatically set to "Content", which is the only allowable source.
Show List: None
Use this setting to display a search box that allows the user to specify any value for the field. If the field is a reference to an object, not using Show List lets the user locate objects of the type named in the Reference To area.
You control how to display information about objects using the Display Columns item.
Show List: Object Query
Use a query to retrieve object information from all of the objects that are selected by the Where Clause.
After you select Object Query, the Process Designer adds the Object Query controls to the Field Properties dialog. The Source for the Where Clause is always Content. While you can enter your condition directly into the text area, it is usually far easier to click the Add Condition button.
Note: The difference between a value and what is shown in the display field may not be clear. In many cases, they may be the same. The difference is that the display field is what is shown to the user while the value is what is stored. For example, if a currency value is stored with two places after the decimal, its display could omit these numbers. This distinction is almost always used with ID fields as you want to display something like a Name while using the ID as the actual value that is stored when the user selects it. Also, you may be using code tables where the code is something other than an Object Id. For example, imagine a States object where the code is the two letter abbreviation that is stored as the value in other objects, but you want to display the full name to users when they are selecting State.
After using this dialog, you can edit the information that it added.
Selecting the field from the picklist is suggested as it is sometimes not obvious what the field's internal name is. The text entered here is a standard SQL WHERE clause. Also, this text does not include the WHERE keyword.
If you are creating more than one condition, you can use the standard AND and OR operators. You can also use the NOT operator to invert the meaning of the condition.
Each condition has four parts:
•The name of a field in the object. In this example, the field is one of those contained within the Account object (this is the object named in the Reference To area).
•An operator that Process Designer uses when it compares the field value on the left with values on the right.
•The kind of data that will be compared. Your choices are Content, Formula, or Field. If you choose Field, you are comparing the contents within the field in the current object with the contents of the field in the type of object being queried.
•The data to which the field on the left is being compared. If the source is Content and you click within this area, a small icon appears to the right. After selecting it, Process Designer displays a picklist from which you can select the name of a field in another object that will be used when making the comparison.
To add an SQL LIMIT clause to a query, enter it in the Where clause text box. For example, enter "Limit 200" to limit the number of retrieved rows to 200. Add a space after the WHERE information and then enter the SQL LIMIT. Else, enter the SQL LIMIT information on a new line.("Limit" can be in upper, lower, or mixed case.) By default, 100 rows are returned. If your process requires more than 100, you must add this clause. However, a read-only object list has a limit of 100 rows, even if you set a query associated with it to more than 100.
If you use a JDBC connection, you can use the ORDER BY unction to sort data.
To use the order by function, click Order By and select a field. For example, you can sort a list of names by a person's last name.
Note: You cannot use the order by function to make OData-enabled requests to a JDBC connector.
Show List: Picklist for Field
Record types are information that you associate with objects that let you select some of the objects. For example, suppose you have "On the Road" and "In the Office" records types for a lead. Your process can use these values to select what other information it should display. If the record type value is "On the Road", you could have a picklist with values A, B, and C. If the value was "In the Office", picklist values could be C, D, and E.
Use this option when using a "Create" Service step with a dependent picklist. While Object Type and Field Name are automatically filled in, you will need to enter a Controller Value. If the user will fill in the field containing the record type, set the Source to Field and also select the appropriate field that this is dependent on. If it is Content just enter its value.
For example, you have a Create Lead Service step that has a "Business Sector" picklist and an "Industry" picklist dependent on it. When the user selects "Technology" from the "Business Sector" picklist, Process Designer can display values set for that sector in the "Industry" picklist, values such as "Computer Hardware" and "Biotechnology." In order for this to operate correctly on the Create screen, you must edit the field properties for the "Industry" field and change the Controller Value" to Field and select "Business Sector" as the field.
Your options when you select Picklist for Field are:
•Object Type: The object type containing the object field. This should already be filled in correctly, so you don't need to change it.
•Field Name: The name of the field that defines the picklist values. This should already be filled in correctly, so you don't need to change it.
•Controller Value: For dependent picklists to display correctly, fill in this controller value. Setting this value to be content is not a good idea since the ID for a record type would be different when used in sandbox and or in the product. What you should do is use a query to dynamically set the controller value. This query must return just one value.
Show List: Users in Role
Users in Role tells Process Designer to locate all users who have the role that you identify.
When you choose this option for Show List, you also select the Role name that Process Designer will use to locate users in that role. The source for each of these can be "Content", "Field", "Formula", or "Screen".