Dependent List.

I'm trying to make a single list field that can uses different list based upon a dependency. For example.
List Field is in the sheet for class, but what shows up in the list is dependent upon what race you have chosen. I'm trying to automate this as much as possible. Can I set a list to datastore? I was think of using a switch to do this Example:

switch (race.text)
{
case Dwarf:
class.list=CombineDataStore('Commoncls', 'Dwfclass');
break;
case Elf:
class.list=CombineDataStore('Commoncls', 'Elfclass');
break;
}
Is this legal? will that work?

Comments

  • I think you can set the field's List property at runtime. ie, Field1.List = "mynewlist".

    You can also look at setting up an 'OnOpen' event to create various lists you might use on the sheet all at once when the file is opened.

Leave a Comment