User selectable value for list objects in Jitterbit App Builder
Use case
In App Builder we can define a data object for a list box control on an application page. Designers will often add criteria to these data objects so that users only select active records at the time of usage. The challenge is that over time, GUIDs will often display on application pages as records become inactive.
The User Selectable value available to be configured for usage in App Builder is compatible with List Objects, Radio and Button Group Controls. This feature allows users to configure information about it at the panel Control level and optionally at the business object level. When configured at the panel Control level (what App Builder looks at when running the page) for a given object will result in only active data rows being presented for selection.
Overview
For background, the underlying issue is that by applying an active filter as part of the business object selection criteria the data is not available for list values that point to inactive data rows. To solve this the active filter needs to be removed from the business object selection criteria and applied within the list control. With this new User Selectable approach, when data is being viewed it will have access to all active and inactive data rows. When the list value is open in edit mode the list will present only active data rows for selection.
To configure
This example will step through creating User Selectable for a List Object, the feature is also supported on Radio and Button Group Controls.
In order for the User Selectable feature to work properly, it must be configured on a panel Edge Case Settings. The List control has a new Edge Case field called User Selectable in the Lookup (Filter Options) control set. This field is where you can set a Boolean column from your data object that is the active indicator column. When the List control goes into an edit state any rows returned where this User Selectable column evaluates to false will be excluded from the selection list. See Figure 1.
- Navigate to the application page containing a list object you wish to modify
- Go to Action Drawer > Design this page
- Select the panel containing the list control
- Click the pop-up icon for the list control
- Click the Edge Case Settings button
- In the User Selectable field from the Lookup (Filter Options) set, set the column that you wish to indicate as the active indicator. For example: ReportsTo
- Click Save
To assist in rapid development a new Usage Type has been added to the business object Column popup. This Usage Type is appropriately named User Selectable. You can tag a column in your business object with the User Selectable usage type. If this has been done, when a List control is added to a panel pointing to this business object, it will fill in the User Selectable Edge Case Setting value for the List control automatically with this column name. This filled in value on the panel Control level can be manually removed or changed to a different value, if desired.
Note
Configuring User Selectable at the business object is optional, and if configured is used as a "hint" to provide any panel it is then used by that contains a list lookup source. See Figure 2.
- Navigate to the Business Logic Layer, to a business object you wish to modify
- Drill into the SQL cog icon for the business object
- Locate the Column you wish to configure as the User Selectable value
- Click the corresponding pop-up icon for the identified Column
- Select User Selectable as the Usage Type value for Advanced (PK and Binding Options)
- Click Save
Configuration example
In this example, we will step through how to disable Categories from appearing in a list that are marked as Inactive when creating a new Product.
-
To start, go to the Action Drawer > Design this page and click the pop-up icon to open the List Control you want to configure.
-
Click on the List Object name from the Lookup Table Properties region to edit it.
-
At this step you can either create or modify a Boolean Column to represent status; in our example here we'll add "Active".
-
Click the Column pop-up icon and select "User Selectable" as the value for Usage Type.
-
Navigate back to the Control Designer for the List Control and click on "Edge Case Settings" from the Features panel
-
Set the User Selectable value to the Column that indicates status. For our example, this is the "Active" column.
-
Navigate back to the Application view and test. In this example you will now see the two Non-Active Categories (Alt-Meats and Custards) no longer appear as options in the list when editing or creating a Product.