Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 9 Monaten, 2 Wochen
Letzter Beitrag:
vor 9 Monaten, 2 Wochen
Beteiligte Autoren:
Ericus, Fabrice Harari, Piet van Zanten

[WB19]Looper based on Query

Startbeitrag von Ericus am 09.02.2017 08:14

Morning

I have a looper based on a query. Not all the fields in the query are displayed in the looper.

However, if I select a row in the looper, is it possible to get access to other fields in the query based on my position in my looper?

Keep in mind the results of the looper can be sorted.

Thanks in advance.



Ericus Steyn

Antworten:

Hi Ericus,

You can add attributes to the looper that are not linked to a control, only to a file item.

Kind regards,
Piet

von Piet van Zanten - am 09.02.2017 09:33
Thanks Piet

I thought there is another way.

I want to display a field from the query in the looper in an edit control so that the user can change it. But you cannot update the underlying file easily because the query draws data from different files.

Regards



Ericus Steyn

von Ericus - am 09.02.2017 11:58
Hi Ericus,

it depends on what you mean by BASED ON.

If it is directly LINKED to the query (ie no code use to fill the looper, then the current position in the looper matches the current position in the query)

So when you select a looper a line, you are positioned directly on the corresponding query line, and you can access all fields of said query

Of course, if you reading a query to fill the looper by code, then the answer is no. In that case, you need to store the unique identifier of the query record in the looper and do a hreadseek on the query to match things up.

Best regards

von Fabrice Harari - am 09.02.2017 12:08
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.