Skip to Content

User selectable value for list objects

Use case

In Vinyl 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 Vinyl 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 Vinyl looks at when running the page) for a given object will result in only active data rows being presented for selection.


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.

  1. Navigate to the application page containing a list object you wish to modify
  2. Go to Action Drawer > Design this page
  3. Select the panel containing the list control
  4. Click the pop-up icon for the list control
  5. Click the Edge Case Settings button
  6. 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
  7. Click Save

Figure 1

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.


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.

  1. Navigate to the Business Logic Layer, to a business object you wish to modify
  2. Drill into the SQL cog icon for the business object
  3. Locate the Column you wish to configure as the User Selectable value
  4. Click the corresponding pop-up icon for the identified Column
  5. Select User Selectable as the Usage Type value for Advanced (PK and Binding Options)
  6. Click Save

Figure 2

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.

  1. 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.


  2. Click on the List Object name from the Lookup Table Properties region in order to edit it.


  3. At this step you can either create or modify a Boolean Column to represent status; in our example here we'll add "Active".


  4. Click the Column pop-up icon and select "User Selectable" as the value for Usage Type.


  5. Navigate back to the Control Designer for the List Control and click on "Edge Case Settings" from the Features panel


  6. Set the User Selectable value to the Column that indicates status. For our example, this is the "Active" column.


  7. 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.