I would like to know if in Axes it is possible the change the display attributes of specific rows/columns of a subfile, not all of them, just some based on a defined criteria.
In case is possible, could you please provide a simple example?
Thank you
attributes of specific rows/columns of a subfile
Moderator: jeanmichel
Re: attributes of specific rows/columns of a subfile
I was able to resolve this situation, but if anyone finds a better solution and wants to share it, I would appreciate it.
I assigned names to the columns of each row (of the first page of the subfile).
I set the STYLE parameter of the subfile Enhancer to dynamic mode.
***************************
Example:
Dynamic mode script
***************************
const FGB = ["",FIELDS("GB1"), FIELDS("GB2"), FIELDS("GB3"), FIELDS("GB4"), FIELDS("GB5"), FIELDS("GB6"), FIELDS("GB7"), FIELDS("GB8"), FIELDS("GB9")];
const FDE = ["",FIELDS("Des1"), FIELDS("Des2"), FIELDS("Des3"), FIELDS("Des4"), FIELDS("Des5"), FIELDS("Des6"), FIELDS("Des7"), FIELDS("Des8"), FIELDS("Des9")];
var i = 0;
var oStyle = new Object();
oStyle["color"] = "white";
oStyle["background-color"] = "red";
for (let i=1;i<=10; i++)
{
var valor = FGB.getValue();
var filtro = valor.substr(0,4);
// Example of Condition
if (filtro == "*" || filtro == " ÑC" || filtro == " MB")
{
FGB.setProperty("axdv.style",oStyle);
FGB.refresh();
FDE.setProperty("axdv.style",oStyle);
FDE.refresh();
}
}
I assigned names to the columns of each row (of the first page of the subfile).
I set the STYLE parameter of the subfile Enhancer to dynamic mode.
***************************
Example:
Dynamic mode script
***************************
const FGB = ["",FIELDS("GB1"), FIELDS("GB2"), FIELDS("GB3"), FIELDS("GB4"), FIELDS("GB5"), FIELDS("GB6"), FIELDS("GB7"), FIELDS("GB8"), FIELDS("GB9")];
const FDE = ["",FIELDS("Des1"), FIELDS("Des2"), FIELDS("Des3"), FIELDS("Des4"), FIELDS("Des5"), FIELDS("Des6"), FIELDS("Des7"), FIELDS("Des8"), FIELDS("Des9")];
var i = 0;
var oStyle = new Object();
oStyle["color"] = "white";
oStyle["background-color"] = "red";
for (let i=1;i<=10; i++)
{
var valor = FGB.getValue();
var filtro = valor.substr(0,4);
// Example of Condition
if (filtro == "*" || filtro == " ÑC" || filtro == " MB")
{
FGB.setProperty("axdv.style",oStyle);
FGB.refresh();
FDE.setProperty("axdv.style",oStyle);
FDE.refresh();
}
}
Re: attributes of specific rows/columns of a subfile
My apologies, I copied the script wrong.
***************************
Example:
Dynamic mode script
***************************
const FGB = ["",FIELDS("GB1"), FIELDS("GB2"), FIELDS("GB3"), FIELDS("GB4"), FIELDS("GB5"), FIELDS("GB6"), FIELDS("GB7"), FIELDS("GB8"), FIELDS("GB9")];
const FDE = ["",FIELDS("Des1"), FIELDS("Des2"), FIELDS("Des3"), FIELDS("Des4"), FIELDS("Des5"), FIELDS("Des6"), FIELDS("Des7"), FIELDS("Des8"), FIELDS("Des9")];
var i = 0;
var oStyle = new Object();
oStyle["color"] = "white";
oStyle["background-color"] = "red";
for (let i=1;i<=10; i++)
{
var valor = FGB.getValue();
var filtro = valor.substr(0,4);
// Example of Condition
if (filtro == " AB" || filtro == " MB")
{
FGB.setProperty("axdv.style",oStyle);
FGB.refresh();
FDE.setProperty("axdv.style",oStyle);
FDE.refresh();
}
}
***************************
Example:
Dynamic mode script
***************************
const FGB = ["",FIELDS("GB1"), FIELDS("GB2"), FIELDS("GB3"), FIELDS("GB4"), FIELDS("GB5"), FIELDS("GB6"), FIELDS("GB7"), FIELDS("GB8"), FIELDS("GB9")];
const FDE = ["",FIELDS("Des1"), FIELDS("Des2"), FIELDS("Des3"), FIELDS("Des4"), FIELDS("Des5"), FIELDS("Des6"), FIELDS("Des7"), FIELDS("Des8"), FIELDS("Des9")];
var i = 0;
var oStyle = new Object();
oStyle["color"] = "white";
oStyle["background-color"] = "red";
for (let i=1;i<=10; i++)
{
var valor = FGB.getValue();
var filtro = valor.substr(0,4);
// Example of Condition
if (filtro == " AB" || filtro == " MB")
{
FGB.setProperty("axdv.style",oStyle);
FGB.refresh();
FDE.setProperty("axdv.style",oStyle);
FDE.refresh();
}
}
Re: attributes of specific rows/columns of a subfile
On Instruction with FGB and FDE missing index i .