Skip to main content


 

Symptoms


There are two lists on the site: Ticket and Ticket Type. The Ticket list has a column that is a lookup to Ticket Type.

On the SmartForm for the Ticket list, there is a "ticket type" drop-down that is populated with entries from the Ticket Type SmartObject. When a ticket type is chosen, a separate list view on the form executes the "Get List Items" method to show all other tickets that share the same ticket type. However, when the method is called, the list view does not populate with any entries.

Note: On the "Get List Items" method call, I am passing the "ticket type" control value into the "ticket type" parameter to filter.
 

Diagnoses


The configuration of the Data Source for the "ticket type" drop-down control has Value set to ID and Display set to oTitle], so when a choice is made in the drop-down control and then leveraged elsewhere, it is passing the numerical ID value for the selected ticket type.

This is then being passed into the "ticket type" parameter on the "Get List Items" method call to attempt to filter the method call on only tickets with the same ID value. However, the "ticket type" parameter is, by default, looking for a string value of the name of the ticket type (e.g. Error, Connectivity, Feature Request), so passing in a numerical ID value will result in no matching entires, hence the empty list view after the method call.
 

Resolution

There are several solutions one can take to achieve proper filtering on the Get List Items method call in this scenario.

Option 1:
In the configuration of the Data Source for the "ticket type" drop-down control, change Value from "ID" to "Title" so that the "Title" string value is passed to the method parameter.

Option 2:
If the control needs to specifically pass the ID value (e.g. for other reasons/usage on the form), then the Get List Item method can be passed the "Title" value directly from the SmartObject tied into the drop-down control. On the rule that is calling the Get List Items method, drag the hticket type].Title (your naming conventions will vary) value into the parameter. In the context broswer, this will likely be found here:

expand the view for the list in question

New ticket] > Controls > tTicket Type Drop-Down List (your name will vary)] > ticket type (SmartObject) > ticket type.Title

This will pass the associated string value to the parameter from the "ticket type" drop-down control.

Option 3:
Configure the SmartObject "Get List Items" method to accept the numerical ID property into the ticket type parameter instead of a string value. Make sure to associate correct ID values. The details of this process are left for a separate community article.




 
Be the first to reply!

Reply