August 20, 201312 yr I have a field in my database that displays the html of a google map with multiple locations. I only use it when I want to copy the html - to display pages on the web for board members to view. (sporadically) The problem is that every time I switch pages the field recalculates based on the records displayed, could be one or a few or thousands, and this makes the database very slow. Even if I'm not displaying the map (its tab is usually not active), this field is calculating the html. For now I've removed the field from the layout to alleviate the slow down, but i was wondering if there was a way to have the field but only have it do the calculation when requested. What's the best approach for that. A script button? or is there another way you would do it? Thanks.
August 21, 201312 yr Solution At risk of stating the obvious, here are some things to consider: 1. Script your finds in a way that limits the found set to a reasonable number. 2. Create a psuedo-tabbed layout, by using a tab-like button that switches to an identical looking layout with the map. 3. Avoid using a calculated field (which will continuously recalculate). Instead create a plain text field that is populated by a script that is triggered when you change tabs. You can combine approach 2 and 3, or use a conventional tab-control. For the latter you would want to give object names to the tabs and initiate the script with an "On object modify" script trigger. Its good that you figured out where the performance problem is coming from. That's often the hardest part.
August 21, 201312 yr Author I took your suggestion and created a text field in a tab. When selecting the tab run a script that populates the field. Great solution. Thanks.
Create an account or sign in to comment