hi everyone, this topic is directly related to this other one, but the topic is totally different, so i'll post a new topic
http://www.mibuso.com/forum/viewtopic.php?f=32&t=44611
i noticed that using GETFILTERS, nav retrieves the field caption instead of the field name: this generate problems while trying to run hyperlinks. do you know if there's a method to obtain the filters with the field name instead of their caption?
The workaround is to use something like
LANGUAGE := 1033;
before the getfilters, but it does not work if the caption is different from the field name, or if the enu caption does not exist.
Thanks in advance
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Answers
Edit: Oh, sorry, I should have read the linked topic before. :-#
take a look at the help: i've been fooled by this one, too... :-$
if i set the parameter to false, i have to trim the field no. from the string, and then go through the field table
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Why do you filter on TableName? The primary key is TableNo,No. Filtering like
SETRANGE(TableNo,DATABASE::MyTable) will be faster.
now that you tell me, i can use tableno, instead of tablename and then retrieve the table name (that i need in the called function you can see in the linked topic) from the field table...
my issue is that i need the field name instead of the field caption in order to make the report hyperlink work.
for example:
dynamicsnav:////runreport?report=18038613&filter=%22Customer%22.%22No.%22:33&filter=%22Customer%22.%22Name%22:22
works but
dynamicsnav:////runreport?report=18038613&filter=%22Customer%22.%22Nr.%22:33&filter=%22Customer%22.%22Nome%22:22
doesn't work
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
I wouldn't go for a temporary table. But if you want to go for it, that should help in case of speed.
But you could also work with RecordRef and FieldRef. The following snippet of code should help you to receive the name (not tested and not adhered to common development rules):
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
If you use like I did, then you could get the filter by There is no need to extract it from the string.
And if you do it in this way you could also check if there's an equals sign within the filter.
but i want to point out that using GETTABLE in my function would force me to pass the rec variable as parameter, making the function useless, because it can't be called from anywhere...
what i can do is to use RecRef.SETVIEW instead of RecRef.GETTABLE, and the problem is solved.
thanks for the unvaluable contribution and here's the final version of the function (this should be 100% bug proof) :thumbsup:
FNTAppendFilter(pINTTableNo : Integer;pTXTFilterValue : Text[1024]) : Text[1024]
where pINTTableNo = no. of the table
where pTXTFilterValue = mytable.getview(false) from the caller object
P.S.: excuse me for the notation with txt, int and so on, but it's a company policy...
Thanks kapamarou and einstein...i'll post (probably in the blog) a sample report that uses also this logic to create links to filtered lists...it's very good to make the customer able to navigate from an "Item list report" directly to the inventory of the item, for example.
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
But you don't need to pass the record as parameter. You can also pass the necessary Record Ref instead of pINTTableNo as Table No.
Database::"my table name"
and you know....i'm tooooooo lazy for this: here's a sample function call:
that is more easy than
-declaring the recref
-apply the filters
-add a recref.gettable(tbitemledgerentry)
-call the function
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog