Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 3 Jahren, 5 Monaten
Letzter Beitrag:
vor 3 Jahren, 5 Monaten
Beteiligte Autoren:
Sascha77, Fabrice Harari

[WD 18] --> [WD 19] HFilter does not work anymore

Startbeitrag von Sascha77 am 21.12.2014 14:17

Hi,

I am now facing an issue with HFilter after upgrading to WD 19.

code is pretty simple and works fine with WD 18:

HFilter(MySelf..BrowsedFile,"1=2)

ERROR:

Code:70212
Unable to define last item used in file.


That error pops up for basically every Table in my Application :(

did anybody face the same issue?

Thanks,
Sascha

Antworten:

Hi Sascha

Quote
Sascha77
code is pretty simple and works fine with WD 18:
HFilter(MySelf..BrowsedFile,"1=2)

Sascha


Nope, but I don't understand what this code is supposed to be doing... There is no syntax where you can open a string with a quote and not close it at the end, and 1=2 is condition that will never be true, so basically saying don't display anything)

I'm guessing that you lost something in your copy/paste

Best regards

von Fabrice Harari - am 21.12.2014 14:32
HI Fabrice,

exactly, the result should always be nothing by purpose. I am using quite a few Overview / Selection Screens on multiple Tabpages (not visible) and the inital process of each of those seletion result grids i don´t want to load all the data when the Programm starts up.

When the user activly opens a new module, the view gets triggered again to bring back the records.

//Actual Code in the Table Init Process
IF _gNot_Loading AND ssIsEmpty(_glIsLookUp) THEN
HFilter(MySelf..BrowsedFile,"1=2")
END

Cheers,
Sascha

von Sascha77 - am 21.12.2014 14:42
ok... now you have a closing quote...

Well I 've never used a filter like 1=2 before, so I don't know about it, but you can easily achieve the same effect by juts changing the ..BrowsedFile property to "" and then back to the real file

As for your error, I am guessing that here too, the compiler became stricter and consider that there should always be a FIELNAME inside a condition (which it should, according to the syntax in the help), and that this was not tested before...

So the simplest way is to use the tried and true ..browsedFile=""

Best regards

von Fabrice Harari - am 21.12.2014 19:52
Hi Fabrice,

you are right! the compiler is more strict with version 19.

the problem was not the Filename but more the condtion for the filter.
I guess the filter now checks if the attribute which is used for filtering has to be part of the File.

HFilter(MySelf..BrowsedFile,"Status ='xx'") works perfectly for me.

Thanks for your help.

Sascha

von Sascha77 - am 22.12.2014 05:07
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.