Quantcast
Channel: Baanboard.com
Viewing all articles
Browse latest Browse all 4216

Add manual UI filter - BaaN IV

$
0
0
Hello,

I have an issue with a multi-occurrence session.
The session's main table is : tisfc001.
And I want to add a filter on the session.
The filter includes a query extension on a table which contains the fabrication order.
So this is the link between the two tables.
But in the database definition there is no indexes between the tables.
And I can't modify the database structure.
Therefore, in the query by form there is no field from the other table.

I added two text boxes which contain the filter limits.
And I tried to modify the session's script.
I wrote this part :

Code:

|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function display.sort()
|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
        domain tcbool exist
        exist = true
       
        if  NOT ISSPACE(seri.from) AND NOT ISSPACE(seri.to) then
                exist = seri.exist()
               
                if exist then
                        query.extension = "tisfc001.pdno IN (SELECT lhlmb132.pdno FROM lhlmb132 WHERE lhlmb132.seri INRANGE :seri.from AND :seri.to)"
                endif
        else
                query.extension = "tisfc001.pdno NOT IN (SELECT lhlmb132.pdno FROM lhlmb132)"
        endif
       
        if exist then
                rebuild.query()
                execute(find.data)
        endif
}

I call the function when I click on a button.

The code doesn't work properly.
Sometimes the UI is totaly blocked and there are no more occurrences.
So you need to close the session and reopen it.
This issue was reduced by using seri.exist() to ensure that there is always data to display but it doesn't seem perfect at all...

Moreover when you add a query by form filter it's well executed.
If you remove it the query by form filter will disapear.
But if you click on the button the old query by form filter will be executed.

Can someone help me on this issue ?

My goal is to filter session's records with the query by form filter and the UI filter that I have added.

Regards

Viewing all articles
Browse latest Browse all 4216

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>