Hi Team,
I want to use the below min.js file as a script
https://public.tableau.com/javascripts/api/tableau.embedding.3.latest.min.js
to load the tableau as a IFrame and use the functions of the scriot file add filter to the loaded URL.
To implement it the min.js file has to be included in Creatio. How do we add this file in Creatio?
Regards,
Adharsh S
Like
Hello,
None of this is tested (and I've not used the Tableau embed script to know if it would work this way), but you can try using require for it by adding the following:
requirejs.config({ paths: { Tableau: 'https://public.tableau.com/javascripts/api/tableau.embedding.3.latest.min.js' } });
Note, you can add this before the page code define and then include as a reference for it:
define("UsrMyCustomObject1Page", ["Tableau"], function (Tableau) {
Then use as something like:
const viz = new Tableau.TableauViz(); viz.src = 'https://my-server/views/my-workbook/my-view'; viz.toolbar = 'hidden'; document.getElementById('tableauVizElement').appendChild(viz);
Ryan
Hi Adharsh
You can use this addon to add JS scripts globally: https://marketplace.creatio.com/app/experceo-global-jscss-editor-creatio
Go to System Settings -> ExpGlobalJSValue to update the global JavaScript script.
require(["https://public.tableau.com/javascripts/api/tableau.embedding.3.latest.min.js], function(lib) {
window.Tableau = lib;
});
Then you can use window.Tableau in your js code.
Hope this helps!