Using Domo.Navigate function in place of HTML Links
Wondering if anyone else has had any luck using the domo.navigate() function in Domo and what you did if successful? I was using HTML links but then found out those were not supported once I published my custom card design to Domo. I have included the domo.js library into my script and am trying to find a way to create links using Domo.Navigate() in my code, but I am not having any success as the information on the domo.navigate() function on Domo's site seems pretty limited.
Comments
-
Is anyone able to help out with this request?
0 -
Hello @user008709,
In the navigate function https://developer.domo.com/docs/dev-studio-references/domo-js#domo.navigate
it is designed to navigate to a page within the Domo instance. For example, if you wanted to navigate to someone's profile it would be "domo.navigate('/profile/3234', true);"To add a hyperlink into your data you have to use a href="" link.
Under the known limitations, we mention that links will only work to whitelisted url's: https://developer.domo.com/docs/dev-studio/faq-known-limitations
If you need to add a link to this whitelist you can open a case with the app support team.**Say “Thanks" by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
hi,
I recently ran into the same problem, and figured it out. Hopefully this will help you too:
In index.html:
<a href='https://YOURINSTANCE.domo.com/page/NUMBER/kpis/details/NUMBER' onclick='navigateToThisLink();'>text about the link</a>
In app.js:
function navigateToThisLink()
{ domo.navigate("https://YOURINSTANCE.domo.com/page/NUMBER/kpis/details/NUMBER"); }Technically you could list any text in href="" section, but I think it's best to show the actual link you're going to link to in the javascript code.
0
Categories
- All Categories
- 1.2K Product Ideas
- 1.2K Ideas Exchange
- 1.3K Connect
- 1.1K Connectors
- 273 Workbench
- Cloud Amplifier
- 3 Federated
- 2.7K Transform
- 78 SQL DataFlows
- 524 Datasets
- 2.1K Magic ETL
- 2.9K Visualize
- 2.2K Charting
- 434 Beast Mode
- 22 Variables
- 510 Automate
- 114 Apps
- 388 APIs & Domo Developer
- 8 Workflows
- 26 Predict
- 10 Jupyter Workspaces
- 16 R & Python Tiles
- 332 Distribute
- 77 Domo Everywhere
- 255 Scheduled Reports
- 66 Manage
- 66 Governance & Security
- 1 Product Release Questions
- Community Forums
- 40 Getting Started
- 26 Community Member Introductions
- 67 Community Announcements
- 4.8K Archive