PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD21] - Test if item exists
[WD21] - Test if item exists
Iniciado por guest, 05,nov. 2016 14:58 - 3 respuestas
Publicado el 05,noviembre 2016 - 14:58
Hi All

I'm sure I've asked before but cannot remember the answer and cannot find it in my code :) How do I test if a field/item exists in a HF file I am using?

TIA
Publicado el 05,noviembre 2016 - 15:48
Hi

For instance use an edt field to enter the thing you are testing on

If hreadseekfirst( file, file.field, edt field) then
it has been found
else
it has not been found
end

regards
Allard
Publicado el 05,noviembre 2016 - 16:55
Hi JP,

you can use hlistitem to list what item are present in your file structure. You then test your item name against the content of the string

Best regards
Publicado el 05,noviembre 2016 - 20:04
Thanks Fabrice.

I ended up using that method but was just wondering whether there was a built WD function. Thanks for the confirmation.

Regards