Performance problems with visibility rules

Forums General discussion Performance problems with visibility rules

This topic contains 3 replies, has 2 voices, and was last updated by  Alexander Bautz 4 months ago.

  • Author
  • #15517



    I have to “recreate” a form, that was made with InfoPath originally.

    The fields are easy but I’m struggeling with the visibility of the buttons.
    I created html buttons in the Tabs (there are 5) and added rules to have them visible only when the field Status has a specific value. Since I didn’t know any better way, I added a rule per status – there are 6 different status for this form, for 2 the rule are the same. Additionally I use the options given in the rules to hide the save and edit button for 4 of the 6 status.

    The thing is – when I activate these rules, it does work but the form takes forever to load (sometimes it even writes out this message). I have no errors in the f12 log.
    As soon as I disable the rules, it’s loading fast again.

    I tried those rules with only the function to hide the save/edit buttons, worked fine, can’t really tell if it was slower.
    But the more rules I activate to hide/set visible the buttons the loading gets slower ๐Ÿ™

    Do you have any idea how I could optimize this, to keep the loading faster?


    I use the “Visible headings or elements” field to refer to the elements unique ID.

    • This topic was modified 4 months, 2 weeks ago by  Artaker.
  • #15589

    Alexander Bautz

    Try adding all the buttons in one HTML section, and give each button an ID like this:

    <button id='rejectTravelExpBtn' style='display:none' type='button'...

    The above button has not been hidden initially with display:none, and you can use the id “rejectTravelExpBtn” in the “Visible headings or elements”.

    Let me know how this works out.


  • #15690


    Hi Alexander!

    Thanks for the suggestion, but this didn’t really help – loading is still much slower.
    I also tried to check the “No reversing of this rule” in each rule and entered the ids of the buttons that should not be shown. Sadly this didn’t make it faster either ๐Ÿ™

    Isn’t there a possibility to hide/show the buttons through one rule? Specially, since I got an additional requirement – I will have to check group membership as well. (So the visibility of the button depends not only on the status of the item but as well the current logged in user.)

    As it is now. it’s too slow and my users won’t be happy (=won’t use it)

    Any other suggestions?
    Thanks very much

    Best regards,

    • This reply was modified 4 months, 1 week ago by  Artaker.
  • #15719

    Alexander Bautz

    Add the buttons to one HTML section in your tab like this:

    <input id="btnNumber1" class="customBtn" type="button" value="DFFS Example button 1" onclick="functionNumberOne();return false;">
    <input id="btnNumber2" class="customBtn" type="button" value="DFFS Example button 2" onclick="functionNumberTwo();return false;">
    <input id="btnNumber3" class="customBtn" type="button" value="DFFS Example button 3" onclick="functionNumberThree();return false;">

    Remove all the rules you have controlling the button visibility, and add this code to the Custom JS:

    function switchButtonsByStatus(){
        // Hide all
        var status = getFieldValue("StatusField");
            case "Not started":
            case "In progress":
            case "Completed":
                // Show a button when status is not set?
    // Trigger on load
    // Trigger on change

    Please note that you must change “StatusField” to your own field name, and the “case” values to match your actual statuses.

    Let me know how this works out.


You must be logged in to reply to this topic.