GetRouting
Description
Get nodes within a condition
Signature
SurveySchema GetRouting(string key, string projectId, bool projectSpecific)
Parameters
Name | Data Type | Description |
---|---|---|
key |
string required |
The authentication key |
projectId |
string required |
ID of the project |
projectSpecific |
bool required |
Not-in-use |
Example
// Create instance of the webservice
var SurveyDesign = new SurveyDesignSoapClient();
//***************************************************
//
// Get Routing, Change, Update
//
//***************************************************
// Get the routing
SurveySchema def = SurveyDesign.GetRouting(key,projectID,true);
// Add a new Directive to Routing
// Create Directive
Directive directive = SurveyDesignUtil.NewDirective(DirectiveDataType.Single);
ArrayList nodes = new ArrayList((Array)def.Root.Nodes);
// Insert as item #3
nodes.Insert(3,directive);
def.Root.Nodes = (Node[])nodes.ToArray(typeof(Node));
// Update
SurveyDesign.Update(key,projectID,def);