Get values for lookup filter

Dear Community,

"lookupListConfig": 
{
	// Array of filters used for the query that forms the lookup field data.
	"filters": [
		function() {
			var filterGroup = Ext.create("Terrasoft.FilterGroup");
			filterGroup.logicalOperation = Terrasoft.LogicalOperatorType.OR;
			var user=Terrasoft.SysValue.CURRENT_USER.value;
			//get roles mapped to logged in user from SysUserInRole before adding filterGroup
			var roles=[];
			for(i=0;i<roles.length;i++)
			{
				filterGroup.add(i,
					Terrasoft.createColumnFilterWithParameter(
						Terrasoft.ComparisonType.EQUAL,
						"UsrSysAdminUnit",
						roles[i]));
			}
			return filterGroup;
		}
	]
 },

I have the following code to filter SysAdminUnit lookup type and I need to filter values with roles that belong to the logged in user alone. I am trying to use ESQ filter to do the same but not getting the expected results. can someone help me on the same?

Like 0

Like

1 comments

Dear S Gokul Aditya,

 

Thank you for your question!

 

We recommend visiting this link below in order to apply filters:

https://academy.creatio.com/docs/developer/front-end_development/crud_o…

 

Please let us know if this is the information you have been looking for!

 

Thank you!

 

Regards,

 

Danyil

Show all comments