Automate

 View Only
  • 1.  Highlighting Read Only Fields

    Posted 11-20-2019 11:33
    In my Composer Form I have several fields which are displayed to the user for reference but are filled in by rules assigned to other fields.  I have a requirement to highlight fields that change to make it easier for the approver to identify fields that have changed.  A standard format rule to apply a yellow color to a field works as expected for a field that is set to Read Only - False but for a field that is Read Only - True, the field stays gray. 

    Looking for options if anyone has faced the same situation.


    ------------------------------
    Greg Papendick | Director - Master Data
    Dairy Farmers of America, Inc. | (816) 801-6458
    ------------------------------


  • 2.  RE: Highlighting Read Only Fields

    Posted 11-20-2019 13:56
    Hi Greg,

    It works fine for me. You can add rules for each field but I find it easy using JavaScript. 

    Please see attached JavaScript for two fields. The JavaScript function triggers if the value in Name_1 (original field) is not equal to Name_1_1 (changed field) and then formatting is applied. I'm calling this function in a custom rule on the approver view. 

    Regards,
    Younus

    ------------------------------
    Younus Ahmed
    Data Quality Analyst | Smith + Nephew
    https://www.smith-nephew.com/
    ------------------------------

    Attachment(s)

    txt
    composer_formatcolor.txt   1 KB 1 version


  • 3.  RE: Highlighting Read Only Fields

    Posted 11-21-2019 08:06
    Younus,

    Thank you for the confirmation.  Not sure why in my case it works for non Read Only fields but not for Read Only fields.  At least now I know that it should work so it must be something in my solution that is causing the issue.


    ------------------------------
    Greg Papendick | Director - Master Data
    Dairy Farmers of America, Inc. | (816) 801-6458
    ------------------------------



  • 4.  RE: Highlighting Read Only Fields

    Employee
    Posted 11-22-2019 11:02
    HI Greg

    That's because of the default styles for read only fields in that they are grayed out.      If you go into debug mode in the browser, you'll see the class and style, which you could override in your own style sheet.
    In the debug window you can see where the grey is assigned to the field
    So you might override the input type password format of the background-color property, but do it selectively for changed fields.

    You could also consider another way to highlight the changed fields - perhaps borders or underlines? 

    Best Regards,
    Sigrid

    ------------------------------
    Sigrid Kok
    pse | Winshuttle North America
    ------------------------------



  • 5.  RE: Highlighting Read Only Fields

    Posted 11-22-2019 12:25
    Sigrid,

    Thank you for the follow up.  I was able to finally find where my command to change highlights was getting side tracked and it is now working.  One other question in kind of the same area.  I have drop down fields that I need to disable temporarily but when I do they are not grayed out.  I am going to go back and try to add the color to them when I disable but not sure why they do not get grayed out when disabled like a text field does.  If that works I can use that technique but it does present the challenge of adding an additional rule every time I switch to ensure that the formatting follows the status of the field. 

    Best Regards,
    Greg

    ------------------------------
    Greg Papendick | Director - Master Data
    Dairy Farmers of America, Inc. | (816) 801-6458
    ------------------------------



  • 6.  RE: Highlighting Read Only Fields

    Posted 11-25-2019 09:44
    It appears that it is not the drop down but rather the combo boxes that will not highlight in any way.  Took a little testing but I have everything working but the combo boxes.

    Thanks again for the suggestions.

    ------------------------------
    Greg Papendick | Director - Master Data
    Dairy Farmers of America, Inc. | (816) 801-6458
    ------------------------------



  • 7.  RE: Highlighting Read Only Fields

    Posted 11-26-2019 04:33
    ​Hi Greg, I had the same problem with combo boxes not greying out when disabled - Winshuttle Support should be able to provide you with a patch

    ------------------------------
    Stephen Butler | Systems Analyst
    RSA Insurance Group Plc
    ------------------------------