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
- 10.5K All Categories
- 3 Connect
- 913 Connectors
- 250 Workbench
- 458 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 476 Datasets
- 183 Visualize
- 249 Beast Mode
- 2.1K Charting
- 11 Variables
- 16 Automate
- 354 APIs & Domo Developer
- 88 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 245 Distribute
- 62 Domo Everywhere
- 242 Scheduled Reports
- 20 Manage
- 41 Governance & Security
- 168 Product Ideas
- 1.2K Ideas Exchange
- 9 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive