|
| Inicio → WINDEV 2024 → [WD21] [HFSQL 21] Need a way to add data to a combo box, faster |
| [WD21] [HFSQL 21] Need a way to add data to a combo box, faster |
| Iniciado por guest, 02,jun. 2017 06:28 - 6 respuestas |
| |
| | | |
|
| |
| Publicado el 02,junio 2017 - 06: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 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 02,junio 2017 - 11:36 |
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. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 02,junio 2017 - 12:34 |
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 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 02,junio 2017 - 14:49 |
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 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 02,junio 2017 - 15:19 |
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 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 02,junio 2017 - 16:56 |
that's what glink(returnedvalue) is for  |
| |
| |
| | | |
|
| | |
| |
| Publicado el 03,junio 2017 - 08:27 |
| Good point Fabrice Harari. Will use that. |
| |
| |
| | | |
|
| | | | |
| | |
|