54
Views
2
Comments
Using import statement in JavaScript to load an external module
Question

I am  attempting to embed Tableau in a web application.

I want to load a module such as TableauEventType from the following library, but I get an error when I write the following in JavaScript

import {

  FilterUpdateType,

  TableauDialogType,

  TableauEventType,

  SelectionUpdateType,

  SheetSizeBehavior,

} from "https://public.tableau.com/javascripts/api/tableau.embedding.3.latest.js";


How can I use JavaScript import statements within Outsystems?

Also, it is not possible to download modules due to Tableau specifications.

Thank you in advance.

2024-08-01 09-19-00
Mohd Shuaib

Hi @Rieko Tanaka ,

Please go through these threads, might be helpful for you - 

Thread 1

Thread 2



UserImage.jpg
Rieko Tanaka

Thank you, Mohd!

See above thread and type=“module” script

but it did not work. I get the same error “TableauEventType is not defined” as before.

I tried storing the Import statement in the Script folder, but that doesn't seem to work.

The import statement itself turns a light color, and the error message “All imports in import declaration are unused.(6192) ” appears. What should I do to resolve this?


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.