Home › Forums › Classic DFFS › Loading Speed
- This topic has 10 replies, 2 voices, and was last updated 9 years, 10 months ago by Jim Andrew.
-
AuthorPosts
-
-
January 5, 2015 at 21:22 #6773
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 -
January 6, 2015 at 08:18 #6776
Hi,
This sounds strange. Can you add some screenshots and more details on the DFFS setup?Alexander
-
January 6, 2015 at 18:02 #6779
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.
Attachments:
-
January 6, 2015 at 20:52 #6782
Hi,
Which version of DFFS are you using? Can you add a screenshot of the rule you use to show these extra fields?Alexander
-
January 6, 2015 at 21:00 #6784
DFFS 4.200
1st screenshot is version information2nd and 3rd screenshot are 2 of the rules
Thanks for taking a look!
Attachments:
-
January 6, 2015 at 23:37 #6788
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
-
January 6, 2015 at 23:49 #6789
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:
-
January 7, 2015 at 08:13 #6791
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
-
January 7, 2015 at 16:36 #6793
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!
-
January 9, 2015 at 09:22 #6798
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 -
January 9, 2015 at 22:24 #6804
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!!!
-
-
AuthorPosts
- You must be logged in to reply to this topic.