On a page with multiple FM instances,
Interested in being able to:
This would allow us to
And would allow for efficient 'one time' loading of data from a CSV into multiple instances. Is this possible?
Thank you
Hello,
Thank you for writing to us.
Our team wants to explain that Flexmonster does not provide the possibility to export data in JSON format.
Also, we want to notice that the described approach implies saving three data set copies on the client's page: one in each instance of Flexmonster and one assigned to the local variable. In its turn, when loading the same data set for both instances from the CSV data source, only two copies of the data set are stored on the page.
However, in case the goal of the described optimization is to reduce the load on the network (CSV data is passed through the network once), we suggest using the following approach. Convert your CSV data in JSON format on the server-side, pass it to the client (for example, using AJAX), and assign it to the local variable. Next, the mentioned variable can be used as a data source for both instances.
Finally, we want to ask you about the reason such optimization is needed in your case. Is it connected with your data set size, or with network limitations? Detailed information on this matter would allow us to recommend the most suitable option for you.
Our team is looking forward to hearing from you.
Do not hesitate to contact us in case further questions arise.
Kind regards,
Illia
Thank you for the quick response.
I understand the conversion on the server side is one method, but JSON is larger than CSV. And if we cannot use Data Server, I was thinking there may be a clever way to get the benefits of using 'inline' JSON (i.e. 1 data, multiple FM instances)
Based on your response regarding three instances of data, I may not have been clear enough in my last message.
Assumptions:
If we could:
It allows us to have the benefit of CSV loading (smaller file) without requiring to load it multiple times across the network for different instances of FM.
Hello, Michael,
Thank you for providing us with additional information on this matter.
Our team wants to explain that the embedData
parameter of the save
API call allows embedding data only while saving the report locally or on the server. Flexmonster does not provide the possibility to retrieve such data and assign it to the variable.
Concerning the approach implying the server-side data conversion.
We want to explain that Flexmonster supports another JSON format represented as an array of arrays, where each sub-array contains ordered values. See the array of objects sample below:
[
[
"Category",
"Color",
"Price",
"Quantity"
],
["Ice-cream", "red", 23.32, 4],
["Ice-cream", "yellow", 4.2, 3],
["Sweets", "red", 45.3, 2],
["Candies", "orange", 22.65, 7]
]
In case the mentioned JSON format is used, the difference in size will be insignificant comparing to CSV.
We recommend referring to our documentation in order to get detailed information about using JSON as a data source for Flexmonster.
Also, we want to take an interest in what exact reasons prevent you from using the Data Server.
Our team is looking forward to hearing from you.
Please let us know in case any further questions arise.
Kind regards,
Illia