Hello,
I have a model-driven app with several option sets being used. For example, "kdj_option1", "kdj_option2", and "kdj_option3".
I need to retrieve only the fields that use "kdj_option2" and "kdj_option3" using JavaScript.
Currently, I have the following code:
function test(executionContext) {
var formContext = executionContext.getFormContext();
formContext.ui.tabs.forEach(function (element) {
if (element.getVisible()) {
element.sections.forEach(function (section) {
section.controls.forEach(function (control) {
if (control.getControlType() === "optionset") {
console.log(control)
}
});
});
}
});
}
How do I modify this line
if (control.getControlType() === "optionset") {
to only perform some code on the fields that do not use "kdj_option1"?
Thanks in advance