Hi Gooddata Team, We are trying to embed the dash...
# gooddata-platform
n
Hi Gooddata Team, We are trying to embed the dashboard via iframe and trying to attempt the pre filtering when fetching it but its still not clear how this should be done. Below steps was followed. Can you please check and let us know if something wrong was done. 1. We have a Test dashboard which has different customer region(attribute) as you can see in first image. 2. Aim is to get iframe/url of the dashboard prefiltered with data of only South region. For this we set the tag on the
Customer Region
with tag value as
south
which can be seen in second image. 3. After this we use the
includeObjectsWithTags=[south]
in embedded url link to get the dashboard with prefiltered south region data only but this didn’t worked. Here is the detailed link https://nitesh.on.gooddata.com/dashboards/embedded/#/workspace/c1o9hnzy7lwdckb8h6hhmc9pzkdm8nip/da[…]ue&includeObjectsWithTags=[south]&setHeight=700 Can you please suggest us what we could be doing wrong here and how this could be achieved? Please let me know if you will need any additional info.
j
Hi Nitesh, if I understand correctly you want to achieve initial filter apply via additional attributes in address supplied. What if you just edit the dashboard, apply the desired filter and publish it? Then you have this filter applied by default. Is this feasible for you?
n
Hi Jakub, Thanks for quick reply. About your question, yes we want to test pre filtering the data when calling the dashboard iframe url. About your suggestion, unfortunately our production dashboard(not test which is shown in above example) will have an attribute which will have couple hundred of different values that we want to filter on the fly when calling the embedded dashboard url. Hence it will be of great help if via Gooddata iframe we can preset the filter while calling the dashboards as this will be called from different places from our portal depending on the attribute value.
Thanks for the input. Unfortunately also tried with the Gooddata platform account that I have with my company. Tried to filter the dashboard based on the
Device Type = mobile
. Also set the tag for
Device Type
attribute as
mobile
as you can see in both screenshots but it didn’t worked out. Here is the link which I used for embedding the url https://datainsights.aklamio.com/dashboards/embedded/#/workspace/lpykd6t5y3j432mdd61pn2gsltf6iiun/d[…]&includeObjectsWithTags=[mobile]&setHeight=700 Can you please check and see where we might be doing wrong?
t
Hi Nitesh! Is the expected outcome that the end user does have the Dashboard pre-filtered and still has the capabilities to change the filter and see other values as well? Or would you like them to see the filtered data only?
n
Hi Tomas, the end expected result would be for users to get only prefiltered data without any filters present on embedded dashboard. I already checked that in gooddata we do have the option to hide filters which should be straight forward but the challenge for us right now is to get the prefiltered data delivered while embedding via iframe or url.
t
🙂 I think we may be able to utilise the data permissions capabilities to achieve exactly what you need. Let us discuss tomorrow when we meet you in person
n
Hi Tomas, Thanks for this information 🙂 Unfortunately I am out of Germany hence wont be able to meet you 😞 But Thomas and other engineers would be there and I might join some calls in between. About our use cases. We have 2 use cases one for external customers and one for our internal. Majority of tomorrow’s discussion would be around external customer use case. For internal customer use case is what I require help. For internal users they should have access to all the data itself but when they visit a certain page of our admin portal they should see only certain data which is prefiltered hence here we might need some kind of filtereing before serving the data instead of setting permission as we dont want to restrict data for our internal admin users.
t
@Jiri Zajic @Dan Homola 🙂 hey guys, looping you in, since this seems to be mainly GD.UI specific, any ideas?
n
Just a note for above comment from Tomas that I am embedding it via iframe and trying to get data prefiltered.
👍 1
d
@Petr Dolejsi can you please take a look? I think this will need some postMessageAPI integration, I am not sure we can pre select particular filter values using the tags, right?
👍 1
p
Hi @Nitesh Jha, the tag feature hides only attributes, metrics, and facts from dropdowns and various components. For example in Analytical Designer, it will hide or show items in catalog, in KPI Dashboards these IMHO includes mainly attributes available in edit mode for new filters, metrics for new KPIs, etc. It is just to exclude some clutter or show only some groups of objects for particular use cases you can have. https://help.gooddata.com/doc/free/en/expand-your-gooddata-platform/gooddata-integrat[…]ta-elements-into-your-applications/embed-analytical-designer
What you want cannot be achieved via URL. You need to embedded your KPI dashboard via iFrame and then write some javascript code that will communicate with the iframe via postMessage API and control the filters of the embedded dashboard programatically, as Dan suggested.
The way how you can setup communication with the iframe and send the commands and listen to incomming responses is described here: https://help.gooddata.com/doc/free/en/expand-your-gooddata-platform/gooddata-integrat[…]d-gooddata-elements-into-your-applications/embed-a-dashboard
Good luck 🤞