cancel
Showing results for 
Search instead for 
Did you mean: 

Cascading Data Sets in API?

Not applicable

I've created a small WinForm (.NET) to allow users to update some keywords across related documents. Two of those keywords share a relationship that could be represented with a cascading data set.

After reviewing the SDK, I was not able to locate any information or objects that seem related to cascading data sets (v15).

I'd like to have a drop down box with the parent data set and when an item is selected, be able to retrieve a filtered list of child data set items to present in a secondary drop down. Is this possible? 

1 ACCEPTED ANSWER

Tyler_Sorber
Star Collaborator
Star Collaborator

Hi Stephen

I would suggest looking into the GetDropDownValue method off of the KeywordType.

Please let us know if there are any questions after looking into the SDK for this method.

View answer in original post

2 REPLIES 2

Tyler_Sorber
Star Collaborator
Star Collaborator

Hi Stephen

I would suggest looking into the GetDropDownValue method off of the KeywordType.

Please let us know if there are any questions after looking into the SDK for this method.

Greg_Pigott
Champ in-the-making
Champ in-the-making

I've set up a cascading data set using external data sets with the IExternalKeywordDataSetScript interface.

The args parameter contains the keyword type that is being requested so I set up a method for each drop down that are included in the set, test the keyword type and make a call to the appropriate method.

For example, Assuming you want to do a vehicle year/make/model cascading data set where once you select a year, you will only see makes for that year, select a make and you will only see models for that make, you can do the following:

if (args.KeywordType == <yearKeywordType>) GetYears(args)

if (args.KeywordType == <makeKeywordType>) GetMakes(args)

if (args.KeywordType == <modelKeywordType>) GetModels(args)

Each of the three worker methods do:

1) Finds related data set value
   a) Find the related keyword record with var kwr = args.SearchParameters.RelatedKeywordRecords.Find(<dependentKeywordType>))
   b) Find the keyword with kwr.Keywords.Find(<dependentKeywordType>);
   c) Get the keyword value

2) Uses this value to determine the requested data set values

3) Adds the resulting values as keyword to args.Results collection 

Note: the top level drop down does not look up dependent data sets because, well, it is the top level and doesn't depend on other data sets.