Best Of
Re: Programmatic Filters Implementation Help
@ekishab, thanks for your question!
Context:
With programmatic filters and dashboard / card embed, your web page will have a dashboard / cards embedded into it by way of an iFrame.
Depending on who is logged into your Web portal / page they may see a sales dashboard / card in the first iFrame and an marketing dashboard / card in a second iFrame - each of the dashboards in DOMO will have it's own associated Embed ID.
For user Mike - viz 1 may be the Sales with its own set of filters and viz 2 the marketing with its own set of filters.
For user Suzanne viz 1 may be the Sales with a different set of filters to Mike and viz 2 the marketing with its own set of filters.
etc.
Code
Looking at the sample.html that came with the code:
<iframe id="iframe1" src="/embed/items/1" width="100%" height="100%" scrolling="no" style="border: none"></iframe>
The source is pointing to the first vizualization in the Users.js file for this user (item/1).
This is handled in the express.js file with the Item/1 passed in from the iFrame:
app.get('/embed/items/:itemId', passport.authenticationMiddleware(), (req, res, next) => { const config = req.user.config['visualization'+req.params.itemId]; if (config.embedId) { embed.handleRequest(req, res, next, req.user.config['visualization'+req.params.itemId]); } else { next(`The EMBED_ID${req.params.itemId} environment variable in your .env file is not set. Please set this in order to view content here.`); }});
Conclusion
For mike, the iFrame will return the Sales dashboard / card with a set of filters applied.
For Suzanne, the Sales dashboard / card will be returned with a different set of filters applied.
You need to ensure that the Users.js file is populated with the correct embed Ids, filters & credentials for the iFrame to be able to retreive the correct visulization for the specific user.
nikky
Re: How to simply assign a value from one variable to another?
thoffman, good question! There is a function in the Domo General Utilities Package called "getListOfObjectLength". This function is authored to accept a list of objects and return a count of the length. If you have a list of objects variable in your workflow, you should be able to map that variable to the input and get a result back.
Re: Period over Period Visual, YTD, 2 Day Delay with Current Date Data
Create a beast mode like this might work for you to exclude the prior year entries are excluded if they are from the 2 days that aren't yet in the current year data.
CASE WHEN DAYOFYEAR(yourdatefield) > DAYOFYEAR(DATE_SUB(CURRENT_DATE(), INTERVAL 2 day)) THEN 'Exclude'
ELSE 'Include'
END
You would drag this beast mode into your filter and filter to Include.
Re: Is it possible to define a color rule for data point 1 based on its value relative to data point 2?
@bjavery87 How I have done this in the past is almost identical to the suggestion from ArborRose, but here is more detail. I created two beast modes.
beast mode 1:case when value>=(target value) then value else 0 end
beast mode 2: case when value<(target value) then value else 0 end
use a line stacked bar chart. set color of beast mode 1 to red, beast mode 2 to blue. The chart will stack the red and blue but you will only see one or the other because the result of one beast mode should always be 0.
Re: Is it possible to define a color rule for data point 1 based on its value relative to data point 2?
I would look into creating a custom column {formula} with the condition you need. The resulting column can then be used as the color condition. Thus, the new column would show when it dips below or rises above, and the color settings would react to that.
Re: using Regex with email connector
@NathanDorsch Try this: .*RMP.*
For future reference is a great resource to test whether your Regex works as expected
Re: Unknown Domo Governance datasets run error
This is an issue with the connector itself as it's expecting that property in the JSON to be returned by the API call but it doesn't exist. You'll need to reach out to Domo Support to have them look into the connector.


