Home > Forum > Rules, JS, SQL > Reports Advanced Cell Coloring - Custom column

Reports Advanced Cell Coloring - Custom column
0

MVP

Hello all,

I have a use case where for a parent workflow (let's say order) I'm starting many child workflows (suborders).
There are some details which i don't want to duplicate on suborders like 'customer' for example - it should be stored only on order, but not on suborders.

In the reports i have one report for orders, second one for suborders - on suborders I'm able to show 'customer' using custom column. With SQL like this:
(
SELECT
dbo.ClearWFElem(WFD_AttChoose2) /* Customer */
FROM
WFElements JOIN
WFSteps ON WFD_STPID = STP_ID JOIN
WorkFlows ON WF_ID = STP_WFID
WHERE
WF_GUID = 'af556142-7ad9-44e1-9xy2-550c2cxz361cf' AND /* GUID WF Order */
WFD_ID = wfelems.WFD_AttChoose5_ID /* Field Order Relation */
)

This works pretty good, although i can't get a grasp how to make it work with Advanced Cell Coloring.

On Orders view, i'm using this:
{
"children": [
{
"element": "span",
"style": {
"color": "red"
},
"attributes": {
"iconName": "=if(WFD_AttBool2 == true, 'FastForward', '')"
}
}
]
}

But on suborders there is no WFD_AttBool2 if i understand it well.
I've tried using _12 (this is the alias of the column generated by webcon), but no luck.
Any ideas how to make it work? :)

MVP

Another day, fresh mind, and I've found a way in some older reports, in this case i was able to use 'CurrentField' instead of 'AttributeName' in Advanced Cell Coloring, so ended up like this:

{
"children": [
{
"element": "span",
"style": {
"color": "red"
},
"attributes": {
"iconName": "=if(CurrentField == 'Tak', 'FastForward', '')"
}
}
]
}

I'm leaving thread open though, as maybe someone will know a way how to reference other custom columns which might come handy someday :)

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.