|
| [WB19] - How do I get the displayed value from a Combo box? |
| Iniciado por guest, 12,mar. 2016 21:49 - 3 respuestas |
| |
| | | |
|
| |
| Publicado el 12,marzo 2016 - 21:49 |
| Anyone know how to get the displayed Value from a combo box in a looper? You have to reference loopers strictly by attributes in Webdev, but there's no "DisplayedValue" property listed in the looper design area... confusing! |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,marzo 2016 - 12:09 |
Hi Joel
Not quite sure what you mean by the display value. Can you explain a bit more.
Cheers André |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,marzo 2016 - 14:01 |
Hi Joel
This is the way I do it.
In the looper you have an attribute ATT_LkpCombo that points to your combo. The value that will be stored in the looper is always the number of the item in the list. So if you selected the 10th item in the combo the value stored in ATT_LkpCombo = 10.
So you create another attribute in the looper let's say ATT_Display.
In the Whenever Modified properties of the COMBO you have some code that lookup the stored value of the combo and update ATT_Display with that value.
If your combo points to a database table or query you have to figure out a way of getting the 10th value of your combo.
If the values are programmed into the COMBO I create 2 combo's. One is hidden and outside the looper. So when you select the 10th value in the combo in the looper you then just get ListSelectPlus(COMBO2,ATT_LkpCombo) and there you get the value.
If the source is an array of values then it is also easy to get the value to display.
Maybe somebody has an easier way to do things but the above does work.
Regards
Ericus Steyn |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,marzo 2016 - 20:22 |
Hi Joel,
One way in WD18 I use is to create a combo_box OUTSIDE the looper for reference and fill it with the same content (so that if it is sorted, you have the same order) as the combo_box inside the looper has. Whenever the row in the looper.combo_box changes, I change the selected row in the 'outside combo_box' too and take the displayvalue from that 'outside combo_box'.
If there is no sort, you can also use an array with the same content as your looper.combo_box has and take the value from that.
Hope it works for you too, Rudolf van Roosmalen |
| |
| |
| | | |
|
| | | | |
| | |
|