EpiGrid cell color

We have an updatable dashboard that users would like to have cells highlighted based on the data in the field.

We have rowrules set up today. The issue with the rowrule is that it highlights all columns which makes it difficult for the users to see which columns they can update.

If I go the route to loop through the grid to set the color of the cell manually, which event should I use? Or is there an EpiMagic feature that I am overlooking. Based on my quick search I don’t see an EpiMagic feature.

Mock up of what users are looking for Users only want the status column to be highlighted. See how the comments field loses its “updateable” color.

Set the row rule to the desired field instead of All Fields.

1 Like

Where is that setting? Going to try and add a fake rule to test as well.

Current code.

RuleAction isCleared_RowAction = RuleAction.AddRowSettings(this.oTrans, "edv_PendingInspections", false, SettingStyle.OK);
RuleAction inProcess_RowAction = RuleAction.AddRowSettings(this.oTrans, "edv_PendingInspections", false, SettingStyle.Warning);
RuleAction missingData_RowAction = RuleAction.AddRowSettings(this.oTrans, "edv_PendingInspections", false, SettingStyle.Error);
RuleAction receivingActionNeeded_RowAction = RuleAction.AddRowSettings(this.oTrans, "edv_PendingInspections", false, SettingStyle.Highlight);

RowRule isCleared_RowRule = new RowRule("RcvDtl_ShortChar01", RuleCondition.Equals, "Cleared from QI", isCleared_RowAction);
RowRule inProcess_RowRule = new RowRule("RcvDtl_ShortChar01", RuleCondition.Equals, "Inspection in Process", inProcess_RowAction);
RowRule missingData_RowRule = new RowRule("RcvDtl_ShortChar01", RuleCondition.Equals, "Needs Additional Info", missingData_RowAction);
RowRule receivingActionNeeded_RowRule = new RowRule("RcvDtl_ShortChar01", RuleCondition.Equals, "Receiving Action Needed", receivingActionNeeded_RowAction);

((EpiDataView)(this.oTrans.EpiDataViews["edv_PendingInspections"])).AddRowRule(isCleared_RowRule);
((EpiDataView)(this.oTrans.EpiDataViews["edv_PendingInspections"])).AddRowRule(inProcess_RowRule);
((EpiDataView)(this.oTrans.EpiDataViews["edv_PendingInspections"])).AddRowRule(missingData_RowRule);
((EpiDataView)(this.oTrans.EpiDataViews["edv_PendingInspections"])).AddRowRule(receivingActionNeeded_RowRule);

New code: Thanks @bmgarver

RuleAction isCleared_RowAction = RuleAction.AddControlSettings(this.oTrans, "edv_PendingInspections.RcvDtl_ShortChar01", SettingStyle.OK);
RuleAction inProcess_RowAction = RuleAction.AddControlSettings(this.oTrans, "edv_PendingInspections.RcvDtl_ShortChar01",  SettingStyle.Warning);
RuleAction missingData_RowAction = RuleAction.AddControlSettings(this.oTrans, "edv_PendingInspections.RcvDtl_ShortChar01",  SettingStyle.Error);
RuleAction receivingActionNeeded_RowAction = RuleAction.AddControlSettings(this.oTrans, "edv_PendingInspections.RcvDtl_ShortChar01",  SettingStyle.Highlight);


RowRule isCleared_RowRule = new RowRule("edv_PendingInspections.RcvDtl_ShortChar01", RuleCondition.Equals, "Cleared from QI", isCleared_RowAction);
RowRule inProcess_RowRule = new RowRule("edv_PendingInspections.RcvDtl_ShortChar01", RuleCondition.Equals, "Inspection in Process", inProcess_RowAction);
RowRule missingData_RowRule = new RowRule("edv_PendingInspections.RcvDtl_ShortChar01", RuleCondition.Equals, "Needs Additional Info", missingData_RowAction);
RowRule receivingActionNeeded_RowRule = new RowRule("edv_PendingInspections.RcvDtl_ShortChar01", RuleCondition.Equals, "Receiving Action Needed", receivingActionNeeded_RowAction);

((EpiDataView)(this.oTrans.EpiDataViews["edv_PendingInspections"])).AddRowRule(isCleared_RowRule);
((EpiDataView)(this.oTrans.EpiDataViews["edv_PendingInspections"])).AddRowRule(inProcess_RowRule);
((EpiDataView)(this.oTrans.EpiDataViews["edv_PendingInspections"])).AddRowRule(missingData_RowRule);
((EpiDataView)(this.oTrans.EpiDataViews["edv_PendingInspections"])).AddRowRule(receivingActionNeeded_RowRule);

You can do all of this in the dashboard settings as well, so you don’t have do it in code.

image

1 Like

This is a custom form though. We call everything a dashboard.

You did the whole grid from scratch? Or you embedded an updateable dashboard?

Ditto. Seems very inefficient if that’s the case =). BAQViews, Dashboards Embedded would all be faster and easier to maintain

From scratch.

Maybe I am over stating from scratch.

Udform

Baq

Attach baq to grid

Format grid

Add buttons and text boxes to form

Thought this was the easy button method.

It’s one of them, depending on if you are using the UD Tables and FKV to connect it to the existing UI etc…

What Brandon was thinking, there is another possible option and the assumption is that you become modular then and you can re-purpose the grid’s. That is to build a Dashboard and then Embed that Dashboard to the UI. According to Epicor it supports both Runtime and Assembly:


2018-11-08_2138_001
2018-11-08_2138_002

Then you could take it out of the Panel and Dock it somewhere else if needed.

It certainly can be magical. I just haven’t found a way to Embed it with a Menu ID that HAS a Customization as a Layer.

2018-11-08_2146

You can also inspect the Show All Code, and add it manually via code:

You can also hit Customize on the Toolbar or Add a Key to show the Main Menu bar as well File, Actions etc…

Here I have an Updatable Dashboard that also has a Custom Action to Bring up a BPMForm, embedded into ABCCode for an Example:

EDIT: But it didnt Publish data to the BPMData Columns, sadly

Perhaps there are limitations, I don’t know them all; but certainly a possibility for simple grids.

But it sure as hell doesn’t clutter up my Customization.

What do you mean by this? The embedding itself is part of a customization layer. I’m confused… :confused:

I have the dashboard deployed to a Menu and then I have a Customization on the Menu, well when I embed that Customization does not come with it. I have buttons on the dashboard I added on a Customization Layer, but embedding Menu UD9128 only embeds the “Base” not w/ Customization

oh, you mean if the dashaboard has a customization on it, I thought you meant in the menu has a customization on it.

Yes, you have to do the customizing to the dashboard on the final menu item, so it wouldn’t carry with it any customization you did to the dashboard before embedding it. That would be a nice feature wouldn’t it?

1 Like