Is there a way to store information that will be accessible by all different blocks in a dashboard?
I have a dashboard that has 4 custom html blocks. To get the data they display they each run a workflow that sends some requests to an API and sends the data to the block. The problem is that all these blocks get their data from the same request so I was wondering if there is a way to only run the workflow once and distribute the data between all the different blocks.
Would you be able to tell me what type of data you are requesting from that API? It may make sense to create a Losant Device for this data and periodically get this information with a workflow. Then you can use the query configuration in the Custom HTML Block configuration.
I’d also love to learn more about what these 4 Custom HTML blocks are doing, and how you are using them. Is there something in our other dashboard blocks that you would like to see that isn’t there currently? Any additional information you can provide around your use case may help me provide better help
@Heath
Ok so this dashboard displays the results of relevance analyses done by our machine learning api. All the data and results are stored by the server. The dashboard is just meant to fetch the results as well as info on those results and display them in a more visible way.
The device idea makes sense but id like for those requests to only be done when the dashboard is loaded up if possible.
The custom html blocks are just specific tables and graphs (probably could have used some of the normal blocks but we chose to use the custom html to have more control over the appearance of it)
In our applications we also had the need to share information between dashboard blocks. And there is a possibility to exchange information between custom HTML Blocks (Iframes), using the same system that is used to receive queries updates on the dashboards. In this case, we use PostMessage (Window.postMessage() - Web APIs | MDN) available in browsers, but it is necessary that the dashboard is inserted in an experience page, and in that page exists a script responsible for receiving messages and sending them to blocks (Cross-window communication).
But an interesting possibility would be to be able to configure a general block, which would load information/characteristics in the other blocks, because in some cases we have style changes, or common scripts used in the blocks, which we made the external storage and imported in the blocks, but if the path of these files is changed, or we upload a version of the file, it must change in all blocks, if there was the possibility of loading in one place, it would be an interesting feature.