Loading Speed

Home Forums Classic DFFS Loading Speed

Viewing 10 reply threads
  • Author
    Posts
    • #6773
      Jim Andrew
      Participant

        I am trying to show a group of fields up after selecting some values in 2 different dropdowns. When I select the value in the second dropdown it take over 90 seconds for the page to display the fields. Obviously that isn’t going to work out.

        Any ideas? Troubleshooting steps I should be taking?

        I can give some more details if needed.

        Thanks,
        Jim

      • #6776
        Alexander Bautz
        Keymaster

          Hi,
          This sounds strange. Can you add some screenshots and more details on the DFFS setup?

          Alexander

        • #6779
          Jim Andrew
          Participant

            I am including some screenshots showing the before and after with some pointers added into the images.

            In DFFS I have a field ‘PO Details’ that I check for a value. Then I have another field ‘Number of PO Line Items’ that is used in conjunction with the first field to determine which fields should be shown.

            A few other notes. In Firefox is does load faster than IE 9 but the difference is maybe 25% faster.

          • #6782
            Alexander Bautz
            Keymaster

              Hi,
              Which version of DFFS are you using? Can you add a screenshot of the rule you use to show these extra fields?

              Alexander

            • #6784
              Jim Andrew
              Participant

                DFFS 4.200
                1st screenshot is version information

                2nd and 3rd screenshot are 2 of the rules

                Thanks for taking a look!

              • #6788
                Alexander Bautz
                Keymaster

                  Try turning on the “Debug rules” option in the rules tab and look in the output for any rules looping.

                  Do you have a lot of rules configured for these triggers? Sometimes you are better off with a custom function if it requires a lot of “logic” to get to your goal.

                  Alexander

                • #6789
                  Jim Andrew
                  Participant

                    Total of 24 rules. I have attached a Word doc with the debug.

                    Certainly appears like things are running more times than necessary. If there isn’t an easy fix I will probably kill all those fields and make people fill out an attachment or something along those lines.

                    It is quite a bit of fields that I am trying to hide and show.

                    Thanks

                    Attachments:
                  • #6791
                    Alexander Bautz
                    Keymaster

                      It looks like you have a bit much going on here. This is a scenario where you would be better off creating a custom function that triggers on the change event on the trigger fields. If you can describe the basic logic you are trying to make, I can make a code example you can use as a starting point.

                      Alexander

                    • #6793
                      Jim Andrew
                      Participant

                        Thanks Alexander. It is fairly simple actually.

                        The PO Details field determines which fields should be shown for each line. If Standard then show: Line Item, Price, Delivery Date, GL Account, WBS, Cost Center. If Service then show: Line Item, Price, Delivery Date.

                        Then the Number of PO Line Items field determines how many Line Items should be shown. The number varies from 1-10. If the user chooses 11+ then we ask them to fill out a spreadsheet.

                        So the 2 fields together will show anywhere between 3 fields to 60 fields. I hope this makes sense. I appreciate any help you can give and understand you have other things to do as well. Cheers!

                      • #6798
                        Alexander Bautz
                        Keymaster

                          Hi,
                          Add this code to your Custom JS section:

                          $("#dffs_POType select, #dffs_NumberPOLines select").change(function(){
                          	showFieldsByPOType();
                          });
                          
                          function showFieldsByPOType(){
                          	var arr, a, b, ticker = 1;
                          	// Hide all
                          	while(ticker <= 10){			
                          		$("#sbs_OuterTR_"+ticker).hide();
                          		ticker +=1;
                          	}
                          	ticker = 1;
                          	a = $("#dffs_PODetails select").val();
                          	b = $("#dffs_NumberOfPOLines select").val();
                          	if(a !== "" && b !== ""){
                          		while(ticker <= b){			
                          			$("#sbs_OuterTR_"+ticker).show();
                          			if(a === "Service"){
                          				$("#sbs_Field_GLAccount"+ticker).hide();
                          				$("#sbs_Field_WBSSAPCode"+ticker).hide();
                          				$("#sbs_Field_CostCenter"+ticker).hide();
                          			}else{
                          				$("#sbs_Field_GLAccount"+ticker).show();
                          				$("#sbs_Field_WBSSAPCode"+ticker).show();
                          				$("#sbs_Field_CostCenter"+ticker).show();
                          			}
                          			ticker +=1;
                          		}
                          	}
                          }

                          You must verify that “POType”, “NumberPOLines” are the correct names. Also check that “GLAccount”, “WBSSAPCode” and “CostCenter” are the right *prefix* for your fields as the script appends 1-10.

                          In the tab where you have the PO lines, your side-by-side index must be from 1-10 for the side-by-side groups of fields as the code hides the entire line and not the individual fields.

                          You must also add “showFieldsByPOType” as “Click function name” for the tab where you display the PO lines.

                          PS: When using F12 to debug the code it will take a long time to render. This speeds up a lot if you close the developer console.

                          Hope this helps you on the way, and let me know if something is unclear.
                          Alexander

                        • #6804
                          Jim Andrew
                          Participant

                            I was able to modify the custom code to do almost exactly what I wanted it to do. I was having some issues with some fields not showing up but I worked around it to a solution that works for now.

                            Thanks much Alexander!!!

                        Viewing 10 reply threads
                        • You must be logged in to reply to this topic.