PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → ArraySeek() with an array of structures
ArraySeek() with an array of structures
Iniciado por guest, 22,ene. 2015 15:11 - 4 respuestas
Publicado el 22,enero 2015 - 15:11
Hello,
I have created an array of structures to hold some information that I need to save in the database in a later moment, but before saving all the data, I need to do some search through the array.
For example I have a structure like this:
STStrukture is Structure
id is int
sEmer is string
END
gstShembull is STStrukture
garrVektori is an array of STStrukture
After I add the data to the vector, I have no idea how to apply the arrayseek() function when I have a certain "sEmer".

Best regards,
Kozeta Leka
Publicado el 22,enero 2015 - 15:42
Ho Kozeta,

It is all in the help...
<a class="ExternalLink" rel="nofollow" target="_blank" href="http://doc.windev.com/en-US/?3075002&name=ArraySeek">http://doc.windev.com/en-US/&hellip;</a>

In the topic:
Quote
Help topic

Seeking an element in a one-dimensional array of structures, classes or advanced types


= ArraySeek(, , , , [ [ ... [, ]]] [, ])



Just my 2 cents,

Peter H.
Publicado el 22,enero 2015 - 23:35
STStrukture is Structure
id is int
sEmer is string
END
gstShembull is STStrukture
garrVektori is an array of STStrukture

search for "Amsterdam" in sEmer

<result>=Arrayseek(garrVektori,aslinear,"sEmer","Amsterdam")
Publicado el 23,enero 2015 - 00:05
Thank you very much for your help!!! <img src="/NG2013_WEB/ui/smiley/1.gif" align=absmiddle border=0 alt=":)">
Best regards,
Kozeta Leka
Publicado el 23,enero 2015 - 11:00
It is in the Help but you need to scroll to the bottom of the options given to get this one.

It is also possible to search on multiple values if you need to.