Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Blank value of a flowfilter

$
0
0
Hi everyone,

I am trying to filter on a lookup of a field fieldXXX: the values displayed on lookup are filtered when opening the page.
I created a flowfilter fieldXXXFilter on the same table and changed the table relation of fieldXXX as following:
TableXXX where Code=fieldXXXFilter
and I created a function GenerateFilter() to generate the value for fieldXXXFilter.
It is working fine, except when GenerateFilter() returns a empty text, then the lookup displays everything as if no filter was applied.
I want that when GenerateFilter() returns a empty text, the lookup gives nothing.
How shall I do it?
Here is my code for GenerateFilter():

GenerateFilter(pType:Option)
WITH TableXXX DO BEGIN
RESET;
CLEAR(DocFilter);
SETRANGE(Type,pType);
IF FINDSET THEN BEGIN
REPEAT
IF STRLEN(DocFilter+Code)+1 > 1024 THEN BEGIN
DocFilter := '';
EXIT;
END;
IF DocFilter <> '' THEN
DocFilter += '|';
DocFilter += Code;
UNTIL NEXT = 0;
END;
END;
EXIT(DocFilter);

Any ideas?
Thanks in advance :smile:

Viewing all articles
Browse latest Browse all 10032

Trending Articles



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