I have a Page with repeater as control. That repeater control will have a column that is actually a calculated field or a function that returns a value. Users ant to be able to filter this value. The problem is the 'filter on this value' is disabled when it's not an actual column field. How can I mimic this behavior? E.g., I want to filter on the calculated field. Please help.
*This post is locked for comments
Hello Murari,
You cannot filter on calculated or table functions. The only way is to use the MARK functions. please read my previous response as I have pasted my sample code.
mbr
Hello mbr,
Even i am trying to find the solution of same problem. But its not possible actually.
If you have found any solution regarding same then please let me know.
Thanks in advance :)
Hello Daniele Rebussi,
I just read your comment on asked question but i am not able to understand. What you want to say exactly. How mark and Markedonly will work in this case
hi MMV, I have created a temp table and set its property as temporary in the globals. Then I run the function once that populates the item and the calc field in that temp table. So whenever they perform filters on the calc field via Page action, I go through that temp table to check if condition for each item is met, if so, mark it. And this is fast! The only downside is initially when it runs to populate, it takes a little time. So all is well now. I may look into another strategy as I don't like the performance degradation when populating the temp table initially. But to answer your question, no, the source table is different from my temp table.
Hi mbr,
Is it the same table you are using as the source of the page where you have written the above code?
Best Regards,
MMV
Hi Daniele. Yeah. I think using Mark/MarkedONly is the only way. I finally got it to work whereby I created Page Actions with the logic and logic values for users to select. Then to actually filter, I am evaluating these logic (<,>,=, <>) selected plus the values (0-9) to perform the test against a calculated fields and then mark records as true. The problem is it's very slow because everytime, I always have to recalculate the field in question as I am unable to read from REC since they are not actual fields. So now I am thinking of storing these calc fields plus the corresponding Item (for primary key) Number in a temporary table which I can declare in the Globals. For some reason, I am UNABLE to insert into this temporary table. It keeps giving me an error: A transaction must be started before changes can be made to the database. My code simply populates the temporary table below at the end of the aftergetrecord event whereby MonthsOnHand field is calculated.
TmpItem.INIT;
NextRowNo := NextRowNo + 1;
TmpItem.EntryNo := NextRowNo;
TmpItem.ItemNo := "No.";
TmpItem.MosOnHand := MonthsOnHand;
TmpItem.INSERT();
What am I missing?
Hi Mbr,
We can filter on FlowField. Can you change it to FlowField?
Otherwise, you have to save information in normal field because we cannot filter on variable or function columns.
You need to handle the filter capability via code, with an object (e.g. a report request page) to allow user typing the filter and using MARK/MARKEDONLY functions to restrict the number of records shown.
Hi,
Unless, it's a table field, I don't think it's possible.
Best Regards,
MMV
André Arnaud de Cal...
292,074
Super User 2025 Season 1
Martin Dráb
230,900
Most Valuable Professional
nmaenpaa
101,156