Page 1 of 1

Dynamically Populate dropdowns

Posted: 09 Sep 2019, 19:39
by Eugene.King
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,

Re: Dynamically Populate dropdowns

Posted: 10 Sep 2019, 19:57
by Fairdinkum
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

Re: Dynamically Populate dropdowns

Posted: 11 Sep 2019, 15:08
by Fairdinkum

By adding the rules to "AutoGUI+", we were able to get the results.
RESULT01.png (48.91 KiB) Viewed 29 times
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
rule01.png (722.97 KiB) Viewed 29 times
Identification Rules
rule02.png (16.29 KiB) Viewed 29 times
rule03.png (159.66 KiB) Viewed 29 times
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 --"};

function(entry) {
var val = entry.split("=");
ret[idx]= {value: val[0].trim(), text: val[1]};


var ret = [
ENV.returnValue = ret;

Best Regards,
Jun Kato