How to use programmatic filter with domo
Hello devs,
I need help over adding multiple i frame with programmatic filter, after reading docs https://developer.domo.com/docs/embed/programmatic-filtering and trying out the JavaScript filter code (https://github.com/domoinc/domo-node-embed-filters) i am not ure how it working for different filters neither the code is working.
So is there any one who have a integration of filter in domo
Comments
-
Hi @sunny
How is it not working? What have you tried? Are you able to log into the sample login page with mike as the user? Did you start up the yarn server to connect to? There's a lot of moving pieces with programmatic filters. It'd be helpful to know what you tried and what the outcome of it was.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
@GrantSmith First of all thanks for your reply.
Steps i take to work with given repository (https://github.com/domoinc/domo-node-embed-filters). After clone i created .env file and paste the Client ID, Secret, EMBED_ID, EMBED_TYPE, then npm install (i am not using yarn).
In terminal i write npm start for running the project. Once project started i open the http://localhost:3001/ in browser where i can simply see company login screen, after putting username and password (rachael), i entered in main screen where filter showing in top of the screen , but entering any filter like merchants and brand it's doing nothing neither any api is called in network mode.
This is image from domo where i used filter for brand Beechnut and only beechnut data is showing
These images are from my localhost, nothing will happened when i clicked on submit filter button
@GrantSmith Let me know can you help me over this issues. Also please take a look at this one github issues.
0 -
What values are you attempting to filter on? Are you using the correct column name?
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**2 -
I have to show multiples iframe in my web app for displaying top 25 products, retail sales, website analytics.
can we do a real time chat for discussions.
I am trying brand, merchant and project team name
0 -
Also one more thing why ports is undefined
```window.addEventListener("message", e => {
console.log('received message on window', e);
console.log("e.ports[0]", e.ports[0]);
// Check origin
if (!e.ports[0]) return;
const referenceId = e.data.referenceId;
console.log(`referenceId = ${referenceId}`);
const port = e.ports[0];
port.start();
const onPortMessage = e => {
if (e.data.method) {
console.log(`received rpc event message with referenceId = ${referenceId} and method ${e.data.method}`);
switch(e.data.method) {
case '/v1/onDrill':
const filters = e.data.params['filters'];
console.log(`filters = ` + JSON.stringify(filters));
const iframe = document.querySelector(`#iframe${referenceId}`);
if (window.ENV.REPLACE_IFRAME) {
iframe.src = `/embed/page?filters=${JSON.stringify(filters)}`
}
break;
case '/v1/onFrameSizeChange':
console.log(`width = ${e.data.params['width']}`);
console.log(`height = ${e.data.params['height']}`);
break;
default:
console.log('params = ' + JSON.stringify(e.data.params));
}
}
if (e.data.hasOwnProperty('result')) {
console.log(`received rpc response message with referenceId = ${referenceId}`);
const result = e.data.result;
console.log(`result = ${result}`);
}
if (e.data.error) {
console.log(`received rpc error message with referenceId = ${referenceId}`);
console.log('error = ', e.data.error);
}
};
port.onmessage = onPortMessage;
ports[referenceId] = port;
});```
0 -
Have you tried URL encoding your pfilters since you're using IFrames? You can use a website like https://www.urlencoder.org to easily convert it for you.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Have you tried URL encoding your pfilters since you're using IFrames? => Yes i am using i frames
You can use a website like https://www.urlencoder.org to easily convert it for you. ==> This is just wrong thing you committed.
Well right now i am facing different issues, in my local all iframes are woking fine but in server no iframes are workiing
0 -
No comment
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 710 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive