I have a grid of data on a screen which behaves like a subfile, with options across the top and a select column. This data grid doesn't contain any of the standard subfile markers so aXes cannot render it automatically as it does with subfiles. Does anyone have any ideas on how I can get the options from across the top of the screen and use them to dynamically populate a dropdown against each row of data? For added complication these options will change base on user authorities.
Thanks in advance for any assistance.
Best regards,
Eugene
Dynamically Populate dropdowns
Moderator: jeanmichel
-
Fairdinkum
- Posts: 128
- Joined: 24 Jul 2017, 17:02
Re: Dynamically Populate dropdowns
Hi Eugene,
We (Fairdinkum) have not experienced it yet. I am currently working on this, but I have not yet realized...
Best Regards,
Hidekazu Tanaka
We (Fairdinkum) have not experienced it yet. I am currently working on this, but I have not yet realized...
Best Regards,
Hidekazu Tanaka
-
Fairdinkum
- Posts: 128
- Joined: 24 Jul 2017, 17:02
Re: Dynamically Populate dropdowns
Hello,
By adding the rules to "AutoGUI+", we were able to get the results.
There are 3 prerequisites.
(1) The value of options can be get using script.
(2) The options' string can be split for drop-down with a delimiter.
(3) Fields of "Selection column" (target) can be set to "Identification rule" of "AutoGUI +".
Setting examples are as follows.
Name of rule is "dropdown" and apply as dropdown Identification Rules Properties script of fixedValues property
==========================================
var fld = FIELDS("Option_F");
var oOptions = fld.getValue();
// alert("oOptions= "+oOptions);
var aOptions = oOptions.split(",");
var ret = [];
var idx = 0;
ret[idx]= {value: "", text: "-- Select --"};
idx++;
aOptions.forEach(
function(entry) {
var val = entry.split("=");
ret[idx]= {value: val[0].trim(), text: val[1]};
idx++;
}
);
console.log("ret="+ret);
/*
var ret = [
{value:1,text:"OPT1"},
{value:2,text:"OPT2"}
];
*/
ENV.returnValue = ret;
==========================================
Best Regards,
Jun Kato
By adding the rules to "AutoGUI+", we were able to get the results.
There are 3 prerequisites.
(1) The value of options can be get using script.
(2) The options' string can be split for drop-down with a delimiter.
(3) Fields of "Selection column" (target) can be set to "Identification rule" of "AutoGUI +".
Setting examples are as follows.
Name of rule is "dropdown" and apply as dropdown Identification Rules Properties script of fixedValues property
==========================================
var fld = FIELDS("Option_F");
var oOptions = fld.getValue();
// alert("oOptions= "+oOptions);
var aOptions = oOptions.split(",");
var ret = [];
var idx = 0;
ret[idx]= {value: "", text: "-- Select --"};
idx++;
aOptions.forEach(
function(entry) {
var val = entry.split("=");
ret[idx]= {value: val[0].trim(), text: val[1]};
idx++;
}
);
console.log("ret="+ret);
/*
var ret = [
{value:1,text:"OPT1"},
{value:2,text:"OPT2"}
];
*/
ENV.returnValue = ret;
==========================================
Best Regards,
Jun Kato