Skip to Content

How can I change the Icons for Documents based on the Validity Date?

I have read in the configuration guide that the variable $(Valid) can be used with Released status DIRs to control the icon definition. Can you provide an example of how to write a validity statement in the dtype.xml for released docs (released icon group) to display different icons?

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Dec 07, 2017 at 12:00 PM

    As one might expect. When someone is forced to answer their own questions, they may find themselves working harder than they have to. I supposed I should have gleamed this solution from my work with other areas of ECTR configurations. In any case, while my answer above works, if was much more effort than was needed.

    The step or requirement that I missed above was the customer_icons.txt definition. In the icon definition, each flag and variable is identified.

    <icondef icon_position="2" icon_group="default" use_status_color="no"

    In the configuration guide, it is indicated that the icons are stored in the images.jar file in the %plm_instdir%\basis\classes folder. While that it true, the guide fails to mention that the statement needs to be written into the dtype.xml AND in the customer_icons.txt. The customer_icons.txt translates the statement from the dtype.xml into specific icon references. The code here is from the standard_icons.txt and is how the above code is translated to specific icon sets. Here you can combine multiple icons and overlays as well.

    flag/flag_version_000	=	{0}/sap/traffic_light_green
    flag/flag_version_010	=	{0}/sap/traffic_light_orange
    flag/flag_version_011	=	{0}/sap/traffic_light_red
    flag/flag_version_100	=	{0}/sap/traffic_light_green<<{0}/sap/external_references
    flag/flag_version_110	=	{0}/sap/traffic_light_orange<<{0}/sap/external_references
    flag/flag_version_111	=	{0}/sap/traffic_light_red<<{0}/sap/external_references

    Now armed with this knowledge I rebuilt my solution using standard icons from the images.jar. The solution was easier and did not require custom icons in the custom images.jar

    The dtype.xml

    <icondef icon_position="3" icon_group="released" use_status_color="no"

    The customer_icons.txt

    flag/doc_is_released_v	=	{0}/sap/done
    flag/doc_is_released_p	=	{0}/sap/status_cancelled
    flag/doc_is_released_f	=	{0}/sap/status_waiting
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 13, 2017 at 06:41 PM

    After some further investigation, I have found that the $(valid) variable can be used to acquire different icons that can be displayed based on a documents validity. It seems that there are not any standard icons available or examples in the guide. So I attempted to build the solution.

    I copied and renamed 3 standard icons from the standard images.jar file.

    1 for each potential result for the variable $(valid). P.png for Past, V.png for Valid and F.png for future. These icons were then stored within a folder named "flag" within %plm_instdir%\customize\config\patches\images.jar (a compressed file).

    I then added the following tag to the DType file for the "Released" Icon_Group.

    <icondef icon_position="3" icon_group="released" use_status_color="no"

    The Icon in position 3 displays as desired for each of the Valid from periods for the Released DIRs.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 24, 2020 at 02:54 PM

    Hello Neal,

    The explanation provided by you has clarified a lot of my questions related to changing icons. I just did change the icon (position 1) for a different Doc Type. Done all the required settings in Dtype.xml too.

    In ECTR, the icon is now showing up just as a white box and missing the actual icon.

    I am under the assumption that I have not placed the new icon at the correct path in Images.jar file. Can you suggest where do I need to place that in order to be picked up by ECTR?



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.