Let's Reconnect, thank you for making 2022 our best year yet.

Look Back
Is it bad practice to access control._source.config.listOptions ? — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Is it bad practice to access control._source.config.listOptions ?

Accepted answer
21
Views
2
Comments
edited Oct 29, 2019 1:01AM in Intelligent Advisor for Fusion Service 2 comments

Content

Hi all,

I have a requirement that a list of values be retrieved via Ajax and pushed into a drop down list.  There are several ways I can do this but one way I've tried I like but not sure if its best practice.

I have an attribute defined on my model as type Text.  I dropped the control for this on an interview screen as type Drop Down, with a customName property of "courseSearch".

I set the default value for the drop down to "... loading ..".  Then I wrote some JS that looks like this:

OraclePolicyAutomation.AddExtension({

customInput: function (control, interview) {

if (control.getProperty("customName") == "courseSearch"){


var newOption = {

displayText : "Option1",

nodeDepth:1,

rawDisplayText : "RawOption1",

value: "1"

};


control._source.config.listOptions.push(newOption);

}

}

})

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!