Using a List Display Control Inside a SmartForm View

I was recently tasked with creating a series of editable SmartForm views based on some that already existed elsewhere in the application. One of the views was based on a SmartObject that contained a series of ID’s pointing to other database tables. The task was to have the list view list the text of the records the ID’s pointed to — not the actual ID’s. Makes sense – to display a value of “1” probably isn’t going to mean anything to the user, but a value of “ALL” will.

Doing this in the list view is the job of the List Display control. The List Display lets one configure the relationship between the SmartObject value and another value in a different SmartObject.

I had thought that my task should be relatively easy — save the original view as the view I was creating, change a little wiring, and I’d be good to go. Not so. For reasons I don’t understand, I simply could NOT make the the properties of my “new version” of the old list view resemble what I needed for the List Display to work.

In my case, it was just easier to start over.

And I found that starting over was exactly what I needed — everything fell in line effortlessly — so much so that I’m a little mad at myself for spending so much time yesterday on trying to make my former approach work.

All to your benefit — because I’m about to walk you through using a List Display object in an editable SmartForms View.

Steps

  1. Start with identifying the SmartObject upon which to base your new view.
  2. Create a new View. Name it, assign it a category, and identify it’s type as a List View, and assign that SmartObject as the data source. Finally, click the Next button at lower right.

    list-display-1

  3. In the layout screen, click on the Create Labels and Controls link at center.

    list-display-2

  4. In the panel that pops up, include the fields needed in the layout. Under Edit Options, be sure to enable list editing if needed, and, under Additional, check the box if you wish to allow the user to manually refresh the list. Click the Next button at lower right.

    list-display-3

  5. I’m going to pick one column in particular — User Id. Click on the column to reveal its properties. You should be able to see, in the Properties form at right, that is set by default as a Data Label control. The control properties point to a SmartObject field and reflects the field’s data type (Number).

    list-display-4

  6. Click on the Change Control icon in the horizontal navigation above the layout, and change the control from Data Label to List Display.

    list-display-5

  7. The properties form for the column should now include a section called Data Source, that was not present when the control was a Data Label.

  8. The top control in the Data Source section of the Properties panel should be the SmartObject. The control appears to be a textbox followed by a button showing an ellipsis (“…”). The value in the field should currently read “(None)”. Click the ellipsis to bring up the Configure Data Source form.

    list-display-6

    list-display-7

  9. In the Configure Data Source popup, select the SmartObject to which the column should refer. You might find the rest of the fields will populate themselves for you — in my case, the Method field set itself to List, the Value field set itself to “Id” (matching the ID value coming from the SmartObject upon which the View is based), and it set the Display value to [Name], which is exactly what I wanted. Click OK to close the popup. You should see some of the other values in the Data Source region of the Properties panel are now populated.

    list-display-8

  10. Save, Finish, and Run your view. You should see that the data for the column you edited shows the text associated with the ID populated in that data column.

    list-display-9