If I have a field which has TableFilter DataType so that user can set the filter for table by them self. How do I apply this filter value into filtering the real table ? Is it possible to do this ?
I dont understand with your suggestion by saving the filter in text file ?
r u saying that I have to load the filter data (from my custom table with tablefilter as filter field datatype) into text file, before load it into table ?
the problem is, I haven't applied the filter to the table, so I can't copied it.
The filter is saved in my custom table in a field which has tablefilter data type. I alredy tried to apply the value of this field into the table using setfilter, but it doesn't work ](*,)
the table filters fields are not strored in database, it use in only temporal. When you execute a report with filters in a table filter fields you can do this:
A report with this structure:
this is where the prolem lay, if I hard code "Date Filter" Field, then if one day user wants to add another permisson, they have to contact developer to add this new field, since they don't have C/AL Lincese, any idea how to make things easier ?
Comments
I have done some testing with tablefilter but never used it in a real situation.
I dont understand with your suggestion by saving the filter in text file ?
r u saying that I have to load the filter data (from my custom table with tablefilter as filter field datatype) into text file, before load it into table ?
How do I load the text into table as filter ?
thanks before
This returns the current filter setting and the key.
You can apply is with SETVIEW.
This is used in the Segments to store the criteria. Look at table Segment Criteria Line for examples.
the problem is, I haven't applied the filter to the table, so I can't copied it.
The filter is saved in my custom table in a field which has tablefilter data type. I alredy tried to apply the value of this field into the table using setfilter, but it doesn't work ](*,)
the table filters fields are not strored in database, it use in only temporal. When you execute a report with filters in a table filter fields you can do this:
A report with this structure:
Customer
CustLedgerEntry
v_Datefilter is a text variable(30)
Customer data item with date filter field.
onprereport event
v_Datefilter:=customer.getfilter("Date filter");
onpredataitem CustledgerEntry event
Custledgerentery.setfilter("Posting Date",v_Datefilter)
I hope this example can help you.
Regards,
Thanks