Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
7
Erster Beitrag:
vor 4 Monaten, 2 Wochen
Letzter Beitrag:
vor 4 Monaten, 2 Wochen
Beteiligte Autoren:
Sivaprakash, Fabrice Harari, DerekT

[WD21] [HFSQL 21] Need a way to add data to a combo box, faster

Startbeitrag von Sivaprakash am 02.06.2017 04:28

Hello,

I have around 5000 master records, which need to be displayed in around 10 combo boxes of a transaction window. Using ListAdd to populate all these 10 combo boxes takes time. I tried using a query to populate this combo box with ListDisplay. It's not working as expected, as Independent HFSQL constant is not ticked.

My plan is to store this master record in a global variable or global combo box, that on opening of the transaction window, this global combo box (or variable) data can be transferred to all 10 combo boxes quickly. [ This is the way we used to do in Powerbuilder, using sharedata ]

Is this possible ? Or any other way is there to physically add to the combo box list ?

Happiness Always
BKR Sivaprakash

Antworten:

Load the data into an array - HExecuteQuery() - FileToArray(MyQuery,MyArray).

Set the content of every combo as the array.
In the returned value you can either select a single field or the complete array row content.

Then use ListDisplay(MyCombo,MyArray) to fill the combo's as required.

von DerekT - am 02.06.2017 09:36
Thanks DerekT, that's what we did, just now, with our trial and error method. Only thing is that we manually added to array, by having a structure. It's working. Let me try to add with FileToArray and check.

Thanks again.

Happiness Always
BKR Sivaprakash

von Sivaprakash - am 02.06.2017 10:34
Hi

a very simple way to do that is to build a CR delimited string with all your combo lines in it, then do ONE listadd with that string.

Best regards

von Fabrice Harari - am 02.06.2017 12:49
The main purpose of having a structure is to a have display value and stored value. Not sure whether CR string would give the same result.

Happiness Always
BKR Sivaprakash

von Sivaprakash - am 02.06.2017 13:19
that's what glink(returnedvalue) is for :-)

von Fabrice Harari - am 02.06.2017 14:56
Good point Fabrice Harari. Will use that.

von Sivaprakash - am 03.06.2017 06:27
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.