Filter lookup based on detail values

Hello Community,

I am trying to create a lookup filter in client side based on the values of a detail. The case is as follows: I want to display within the application only the contacts which are in the detail UsrApplicationAssignedTo where the application id must be equal to the id of the current application.

 

After adding the following code to my page I get 0 records.

 

attributes: {
	"UsrAssignedTo": {
		// Attribute data type.
		"dataValueType": Terrasoft.DataValueType.LOOKUP,
		// The configuration object of the LOOKUP type.
		"lookupListConfig": {
			// Array of filters used for the query that forms the lookup field data.
			"filters": [
				function() {
					var filterGroup = Ext.create("Terrasoft.FilterGroup");
					filterGroup.add("Contact",
						Terrasoft.createColumnIsNotNullFilter("[UsrApplicationAssignedTo:UsrContact].UsrContact.Id"));
					debugger;
					filterGroup.add("AppFilters",
						Terrasoft.createColumnFilterWithParameter(
						Terrasoft.ComparisonType.EQUAL,
						"[UsrApplicationAssignedTo:UsrApplication].Id",
						this.get("Id")));
					return filterGroup;
				}
			]
		}
	}
}

 

Like 0

Like

1 comments
Best reply

Hello User 1997,

 

Similar filter example was already provided here with the only difference in the section name (there it was the Projects section, here it's Applications section).

 

Best regards,

Oscar

Hello User 1997,

 

Similar filter example was already provided here with the only difference in the section name (there it was the Projects section, here it's Applications section).

 

Best regards,

Oscar

Show all comments