Dataset Switching using vb.net
Answers
-
'switch datasets' ... what do you mean?
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
using datasetRedirects at run time. Basically changing the dataset for all cards on a dashboard on a webpage. Lets say you have a database with 2 tables in it - both have the same exact structure. Instead of combining the data from both tables into 1 table and using programmatic filtering you can swap out the datasets for a dashboard at runtime by using datasetRedirects. We cannot get this to work in .net
0 -
i assume this is what you're talking about.
are you able to get the desired outcome using other embed methods? what code are you writing that does not work?
(caveat, i don't know much about vb.net, but "it's not working" is a bit hard to troubleshoot :P )
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
We are an angular shop. So we can only use .Net
Dim embedTokenRequest As New HttpRequestMessage() With {
.RequestUri = New Uri(embedAuthUrl),
.Method = HttpMethod.Post,
.Content = New StringContent(JsonConvert.SerializeObject(New With {
Key .sessionLength = 1440,
.authorizations = {
New With {Key .token = embedId,
.permissions = {"READ", "FILTER", "EXPORT"},
.datasetRedirects = {"v1:v2"}
.filters = {New With {Key .column = "ENTRY_YEAR", .operator = "GREATER_THAN", .values = {"2020"}}},
.policies = Nothing}
}
}))
}
The resulting JSON string is supposed to be formatted like Domo's example: on https://developer.domo.com/docs/embed/dataset-switching. However we cannot get the resulting json string to be "dataSetFrom":"dataSetTo"
visualization1: {
clientId: process.env.CLIENT_ID, clientSecret: process.env.CLIENT_SECRET, embedId: process.env.EMBED_ID1,
datasetRedirects: {
"a19d0ef1-ca31-4bfd-b168-018b93109671":"a19d0ef1-ca31-4bfd-b168-018b93109672",
"a19d0ef1-ca31-4bfd-b168-018b93109673":"a19d0ef1-ca31-4bfd-b168-018b93109674"
},
filter: {"@type":"IN","leftExpression":{"@type":"COLUMN","columnName":"color"},"rightItemsList":{"@type":"EXPRESSION_LIST","expressions":[{"@type":"STRING_VALUE","value":"red"}]}}
},
}
0 -
.datasetRedirects = {"v1:v2"}
this looks problematic (compared to the rest of the code you're writing.
shouldn't it be
.datasetRedirects = { .v1 = v2"}
or something similar.
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
V1 and V2 are just variables. Ultimately the resulting json needs to be formatted like:
"a19d0ef1-ca31-4bfd-b168-018b93109671":"a19d0ef1-ca31-4bfd-b168-018b93109672"
0 -
i understand. i'm questioning whether the code you've written would actually return that result. what json ARE you getting?
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0
Categories
- 10.8K All Categories
- 3 Private Company Board
- 1 APAC User Group
- 12 Welcome
- 39 Domo News
- 9.7K Using Domo
- 1.9K Dataflows
- 2.5K Card Building
- 2.2K Ideas Exchange
- 1.2K Connectors
- 343 Workbench
- 260 Domo Best Practices
- 11 Domo Certification
- 464 Domo Developer
- 50 Domo Everywhere
- 105 Apps
- 714 New to Domo
- 85 Dojo
- Domopalooza
- 1.1K 日本支部
- 4 道場-日本支部へようこそ
- 26 お知らせ
- 64 Kowaza
- 299 仲間に相談
- 653 ひらめき共有