This topic is locked

Multiselect - More than one?

9/29/2014 3:04:19 PM
ASPRunnerPro General questions
acaruson author

I have a simple entry form, where I'm hoping to have two separate "multiselect" controls. Each pointing to a separate table of options/choices.
When I build the form, no matter what I do, BOTH controls end up pointing to the same table...and displaying the same values (from the one table).
If I use the "Lookup Wizard" on one of the controls, the other one is immediately corrected....and visa versa. However, if I make them both "Multiselect", they both end up displaying the same table of options.
'MULTISELECT ONE
this_object.settings("required") = true

this_object.settings("selectableHeader") = "<div class=""custom-header"">Select from this list of Events</div>"

this_object.settings("selectionHeader") = "<div class=""custom-header"">You Selected the following Events</div>"

this_object.settings("selectableFooter") = "<div class=""custom-header"">Select from this list of Events</div>"

this_object.settings("selectionFooter") = "<div class=""custom-header"">You Selected the following Events</div>"

this_object.settings("disabledClass") = "disabled"

this_object.settings("selectableOptgroup") = false

this_object.settings("selectDeselectAll") = true
this_object.settings("table") = "tbl_dropdown_Event_Types"

this_object.settings("link_field") = "Event_Type"

this_object.settings("display_field") = "Event_Type"

'MULTISELECT TWO
this_object.settings("required") = true

this_object.settings("selectableHeader") = "<div class=""custom-header"">Select from this list of Store Areas</div>"

this_object.settings("selectionHeader") = "<div class=""custom-header"">You Selected the following Store Areas</div>"

this_object.settings("selectableFooter") = "<div class=""custom-header"">Select from this list of Store Areas</div>"

this_object.settings("selectionFooter") = "<div class=""custom-header"">You Selected the following Store Areas</div>"

this_object.settings("disabledClass") = "disabled"

this_object.settings("selectableOptgroup") = false

this_object.settings("selectDeselectAll") = true



this_object.settings("table") = "tbl_dropdown_Store_Areas"

this_object.settings("link_field") = "StoreArea"

this_object.settings("display_field") = "StoreArea"

[/size][/font]
[size="4"]Anyone have any ideas? Is it something silly I missed?[/size]

admin 9/29/2014

You should point this question to this plugin author, it were developed by a third party developer.
My personal suggestion is to use Multiselect option in lookup wizard that comes with ASPRunnerPro.

acaruson author 9/30/2014



You should point this question to this plugin author, it were developed by a third party developer.
My personal suggestion is to use Multiselect option in lookup wizard that comes with ASPRunnerPro.



I posted an additional thread here as well. Thanks.
Do you think it has to do with the "this.object" reference?

G
gonzalosb 10/1/2014

Hi acaruson,

i think that what happen is that bough tables read the first object settings because they have the same table and field names.

try rename the tables and the settings accordingly,do this for example:



'MULTISELECT ONE
this_object.settings("table") = "tbl_dropdown_Event_Types"

this_object.settings("link_field[color="#FF0000"]1") = "Event_Type"

this_object.settings("display_field") = "Event_Type"
'MULTISELECT TWO
this_object.settings("table[color="#FF0000"]2") = "tbl_dropdown_Store_Areas"

this_object.settings("link_field") = "StoreArea"

this_object.settings("display_field[color="#FF0000"]2") = "StoreArea"

acaruson author 10/1/2014

Thanks for the help.
I tried changing the names you indicated, but got the following error:
Microsoft VBScript runtime error '800a0009'

Subscript out of range: '[number: 0]'

../include/dbcommon.asp, line 65
Should I JUST be changing these three lines...or all lines in the Multiselect that have a reference to "this_object.settings"?
this_object.settings("table2") = "tbl_dropdown_Store_Areas"

this_object.settings("link_field2") = "StoreArea"

this_object.settings("display_field2") = "StoreArea"
Is there something else I also need to be changing to reference "table2"?

G
gonzalosb 10/1/2014



Microsoft VBScript runtime error '800a0009'

Subscript out of range: '[number: 0]'

../include/dbcommon.asp, line 65


as for this error i think that you need to change the field name on the database, doesnt found the table name.

if you use the same field for bough tables try to create 1 for each multiselect box.

please display how the database is divided for this section to see how you are connecting to it.

acaruson author 10/1/2014



as for this error i think that you need to change the field name on the database, doesnt found the table name.

if you use the same field for bough tables try to create 1 for each multiselect box.

please display how the database is divided for this section to see how you are connecting to it.


I'm not. As you can see from above, each has a different table name, etc. Each runs just fine when it is the ONLY MULTISELECT on the form. However, as soon as there are two...the data for one, shows up for both of them. Renaming, as you described, causes the error I noted. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=75830&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />