Problems with get data of QuickFilters


 

I have this list page, which has two QuickFilters, I need to get the values ​​from these quickfilters so that when the New button is pressed, these values ​​are passed to this new page to be taken into account when creating a new Payment.
One of the filters selects the contact and another selects the Loan to which the payment will be made. I have tried many ways, but I am unable to get the data from the quick filter.

Like 0

Like

5 comments
Best reply

How are you trying to do it? there is an element in the $context.attributes that must have the quickfilterName + "_value" and could be an array

How are you trying to do it? there is an element in the $context.attributes that must have the quickfilterName + "_value" and could be an array

Hi Jesus, I have tried to do it through that way but I only get undefined

hmm, if you do a console log to every change request in the handler (without specifying the attributeName) you can make sure you're using the correct name. I guess you've already done it, but just to make sure. 

 

Aditionally, there you could see in what format it comes. From what I see, it should show an array of objects, each object with an id and a displayValue

 

Probably the undefined is because of trying to get directly the value from the array without specifying which indexes. Or maybe you're trying to get the value from an inexistent field in the lookup. It's hard to tell without seeing the actual code

Carlos Soto,

Jesus is absolutely right. You may cover your task by taking the element code + "_value" in handler.

Please check one more time where exactly you are trying to take the filter value.

Hi Anhelina,

 

this is the code in the javascript of my form page

 

As you can see, the quickfilter does not have a control with which you can control the change in the field or recover the value that is set to it.

 

	"operation": "insert",
				"name": "QuickFilter_Loans",
				"values": {
					"layoutConfig": {
						"column": 1,
						"row": 1,
						"colSpan": 1,
						"rowSpan": 1
					},
					"type": "crt.QuickFilter",
					"config": {
						"caption": "#ResourceString(QuickFilter_Loans_config_caption)#",
						"hint": "",
						"icon": "filter-column-icon",
						"iconPosition": "left-icon",
						"defaultValue": [],
						"entitySchemaName": "DfcLoans",
						"recordsFilter": null
					}
Show all comments