Forum Discussion

BradLemke's avatar
BradLemke
Qrew Assistant Captain
6 years ago

Color Coding a report that is displayed in a form to indicate which workorder you're currently in.

Scenario:  In my [WorkOrders] table, I am tracking deliveries to addresses as well as managing the various projects that these deliveries are for.  There are times where I make multiple deliveries to the same address, all to different sub-projects of the same overall project.  As a result, I have a report displayed in the project actions tab of the form to displays all orders to the address referenced in this workorder.

I would like to know if there's a way to color-code, highlight, or in some other way indicate which workorder I'm currently in/editing so I (and my collegues) can quickly identify it.

4 Replies

  • Yo can create a rich text formula:
    if(condition,"<CENTER><div style=\"color:white; background-color:blue;\">"& " blue" &"</div></CENTER>","<CENTER><div style=\"color:white; background-color:green;\">"& "Other Color" &"</div></CENTER>")

    Or, simply you can use Color-Coding option in the report settings. All is up to you.
  • BradLemke's avatar
    BradLemke
    Qrew Assistant Captain
    I would prefer to use the color-coding option in the report settings since that appears to be the least-invasive way to implement the change (so far as I can tell), however the formula to drop in there is something I'm not entirely clear on.
  • I would like to know if there's a way to color-code, highlight, or in some other way indicate which workorder I'm currently in/editing so I (and my collegues) can quickly identify it

    To clarify - you want to set up a report such that if you have an edit form open in a record shown in that report, that record is highlighted to others users viewing that report, while you have that form open?

    This is possible, but it's going to take some doing.

    First, add two fields to the table that the report is on. First is a formula checkbox field, let's call it [EditMode]. Second, a formula url field, let's call that [EditButton].

    Next, create a button in [EditButton] that does two things: (1) updates the value of [EditMode] in that record to TRUE, and (2) opens an edit form on that record. This button will be visible on the report we're focusing on.

    For instructions on creating formula url buttons, there is lots of material on this forum, or you can download Kirk Trachy's Magic Buttons tutorial app from the app exchange - it includes instructions, samples, and links to explanatory Youtube videos. I highly recommend that you get this app and set aside a couple of hours to experience all it has to offer - whether you implement this solution to this need or not.

    Now, the easy part: color-code the report. In the report settings, scroll all the way down to the last section, and tick 'Write a formula'.
    If ([EditMode] = TRUE,"#95CD3C",null)
    Will do the trick. That's a nice calm spring green, or you can use a hex color code of your choosing.

    Lastly, un-check your box. I think we'll use an automation for this. Create an automation on that table. The trigger for the automation will be any time a record is modified on that table (ie. a form in edit mode is saved), and the action it performs will be to set [EditMode] to false.**

    There should be lots of tutorials and instructions available to you to set up Automations, which are an exciting and fairly new feature in the software.

    I've never done anything like this. I didn't test this setup. But I believe this will work - the [EditMode] flag will be set to TRUE when you use the button on your report to open it in edit mode, and will be set back to FALSE when you save it - in other words, for the duration of the time you are editing the record. And the color coding on the report will highlight that record for other users viewing that report. Hopefully I understood your question correctly!


    ** This may require some fudging, to ensure that the automation doesn't fire when you click the button from the report in the first place. If you get this far and get stuck on that bit, post back and we'll think of something.
  • BradLemke's avatar
    BradLemke
    Qrew Assistant Captain
    I see where you're going with that line of thinking, and I see how it would work as well.  It'll be a fairly daunting task to undertake, however, since I'd have to also re-work the way users get into workorders (which opens up a whole different set of cans of worms all at the same time).  

    I will let this marinate for a bit.