Always all records showing in Form Subgrid


When I put the chart in a form subgrid selecting "show chart only" all the records are showed in the map. Seems like is not using the filtered record view or even any of the custom views.

Is this a known issue? The maps in the dashboard work great and show only records present in the selected view.

kind regards and thank you for this great solution! :)


Driminary wrote Jun 11, 2015 at 3:16 PM

Just to explain a little:

When you put the chart on a form subgrid with other subgrids:

The chart script searches for the XML data using the effectiveFetchXml for the subgrid. One of the validations is that the effectiveFetchXml is a HTML Div element (i.e. It's the only subgrid on the page). If you have more than one you have to reference the subgrid you want in to get the effective FetchXml for.

I don't have a perfect solution for it at the moment, but since I knew that my subgrid was going to be drawn first in the form I just changed the first if condition in loadData in dd_chartMap.htm

                if (parent.effectiveFetchXml && Object.prototype.toString.call(parent.effectiveFetchXml) == "[object HTMLDivElement]") {  // Web
                    FetchXml = buildFetchXML(parent.effectiveFetchXml.getAttribute("value"));
                if (parent.effectiveFetchXml && Object.prototype.toString.call(parent.effectiveFetchXml[0]) == "[object HTMLDivElement]") {  // Web
                    FetchXml = buildFetchXML(parent.effectiveFetchXml[0].getAttribute("value"));
Hope this helps. (And yes I realise this is an old issue but I found it still present.)

wrote Jun 11, 2015 at 3:16 PM

wrote Feb 9 at 3:14 PM