This is a demo program on how you can populate a list box based on a selected field.
This is a demo program on how you can populate a list box based on a selected field. You first select the file, you will then be given a list of the character fields within the file. You select a field and in the background the script will summarize the field and get all the unique items in that field and place them in a list box so you can select one or more items.
Comments
BENOIT
Mon, 03/11/2019 - 17:09
Permalink
Hi Brian,
Hi Brian,
Do you know if it's possible to have a value by default to the droplistbox1 ? (and the items attached to this value into the listbox1) ?
Thanks.
Benoit
Brian Element
Mon, 03/11/2019 - 18:14
Permalink
Hi Benoit,
Hi Benoit,
Yes it is but you must set the default before you call the dialog, you can't set a default once the dialog is open. Here is some example code for you, you can copy it and paste it into your IDEAScript editor. It has a dialog with a list of fruit, it sets the default to item 3 (which is actually the 4th item as arrays start at 0).
BENOIT
Tue, 03/12/2019 - 04:51
Permalink
In fact, I wanted to get
In fact, I wanted to get always the value "JOURNALCODE" in the DropListBox1 (in my example, a DropListBox is therfeore not necessary).
But the values in the listbox1 must change according to the input file.
Thank you
Brian Element
Tue, 03/12/2019 - 07:22
Permalink
The lisbox1 is an array so
The lisbox1 is an array so what you need to do is find out which value in the array is the same as the value you want as the default. I have modified my example above so that it will select Oranges as the default.
BENOIT
Wed, 03/13/2019 - 09:36
Permalink
ok thanks for help
ok thanks for help