Dialog options

5 posts / 0 new
Last post
E.Heizyk
Offline
Joined: 11/29/2018 - 16:53
Dialog options

Hi I am trying to put together a dialog window to accomplish the following:
Dropdown that allows the user to select any field from the active databse.
Each unique value from that field show up  allowing the user to check off values to be handeled differently later in the program.
 
Is this possible, if so, do you have any resources that could help me accomplish the task? I already have the dialog box built and working for the rest of the program, I am trying to add this on.
Thanks!

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

I am not sure if I fully understand what you are trying to accomplish.  I have put together a series of vidoes on the dialog that might answer your question, if not come back and I will see how I can help. https://www.youtube.com/watch?v=okX_77S76ro&list=PLIe6DH8SIgZPHpXLLSrVT8...

E.Heizyk
Offline
Joined: 11/29/2018 - 16:53

I found out that there is no way to select multiple items from a Drop List Box, and found your example of using listboxes to select files / fields and I am working on using that to solve my problem. 
I attached the script I am working on. 
DropListBox1 is accurately pulling each field from the databse. Then I need to select PushButton2 where a second window opens, (dlgDetermineEECodes) where each unique item from the field selected in DropListBox1 is populated into ListBox1.
When I run the script, I am getting the error 'Subscript out of Range' on line 324 once I click PushButton2 on my NewDialog window.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

The problem I see is that you are calling the getFields() function for the drop-down and also to populate the listBox but the listBox should be populated based on the contents of the field in the drop-down if I am understanding your script.  Also the listBox is looking for an array called Fields (maybe should rename this) to populate the listbox where as this array never gets populated, that is why you are getting the error.

E.Heizyk
Offline
Joined: 11/29/2018 - 16:53

I found the discussion at: https://www.ideascripting.com/forum/obtaining-data-database-use-selection-criteria which helped.
The difference is that I want the user to be able to select multiple options from DropListBox2.