How to highlight a relationship tab

Hi there,

I'm looking to highlight certain relationship tabs (say the Documents tab under a Part item). Now I've found controls to edit the CSS of various fields of the Part form, but I haven't been able to figure out how I can for instance change the background colour of the Documents tab label (in order to pull a users attention towards it, for instance).

Is it at all possible to dynamically change the look of that particular piece of the form (by firing a method on the onLoad and/or onFormPopulate events for instance), or are those controls entirely inaccessible?

Kindest regards,

Remco van Oosterhout

Parents
  • Hi Remco,

    thanks for your feedback!
    The current solution with AML worked 90% reliable. A good rate at the first glance, but not sufficient, as sometimes the tabs were colored wrong.

    I like the SQL idea! The files flag used in the Part and Document ItemType do something similar. I already use additional indicators for AML and Documents.
    But I wonder how we can use this concept in a larger scale (~30-40 ItemTypes in my case) the most easy way?
    It's not about the technical challenge, I'm afraid of the organizational side.
    Maybe we can create a separate PolyItemtype to store the information for the different ItemTypes. This way not every single ItemType has to contain additional tab indicators. But of course we still have to take care for the relationship actions.


    We could even integrate some kind of more advanced logic. Instead of displaying content yes/no indicators, we could display some more precise information about the relationships.
    Something like this:

    BOM (105) | BOM Structure (View) | AML(3) | Documents (0) | ERP (Federated) | Goals (2)


    I have heard a rumor that Aras plans to integrate something like this in a future release. I have no exact information, but I also want to avoid double work.

  • You could add a server side event on the ItemType itemtype that adds a property to the parent itemtype on the OnAfterCreation event of a new relationship itemtype that has the name of that relationship itemtype. You can should then also be able to dynamically add a server side event to the newly created relationship itemtype that get fired on its OnAfterCreation event that checks if the corresponding boolean of its parent item has been set. Or it increases the corresponding integer of its parent item by one, if you actively want to keep count. You should be able to do that with a generic method. That way you'd have automated the full behavior.

  • I had a quick idea while working on another use case. Instead of using tons of Methods for setting booleans or string properties that contain the relationship information, maybe a mixed federation attempt could do the job more easily?

    What if we use a SQL View that counts the relationships and than just link the results to our properties. This way, even a live update of the tab labels should work without tons of additional Method. I am not sure, how fast "SQL views" are calculated, but in the past I never had speed problems when using them.

  • For those you are still interested in this topic. Using federation wasn´t the best approach, but a classical SQL procedure similar to the files flag function can do the job.

    Isn´t it beautiful? :-)

Reply Children