Is there a way I can generate url based on what filters a user selects in the quick sight embedding?
Is there a way I can generate url based on what filters a user selects in the quick sight embedding?
Hi @sribaji
Have you looked into this?
yes but that is passing the parameters in url directly. But what I’m looking is based on what users selects, it has to generate the url. Lets say I’ve this parameter called Profile and I’ve options like accounting, Sales etc…so when a user selects the accounting, it has to generate that url with accounting in it, is it possible? I’ve this code but this prefills with accounting
const embedDashboard = async() => {
const {
createEmbeddingContext,
} = QuickSightEmbedding;
const embeddingContext = await createEmbeddingContext();
const container = document.getElementById("Container");
Const frameoptions = {
url: myurl
container: container
width: “300%",
height: 200%",
};
const contentOptions = {
parameters: [
{
Name: ‘profile’,
Values: [
‘Accounting’
],
},
],
}
Const dashboard = await embeddingContext.embedDashboard(frameoptions, contentOptions);
Hi @sribaji ,
If you want to pass in the user selection that was made in parent application, passing in the desired parameter value in contentOptions while calling embedDashboard is the right way. You already got the relevant sample code. You just got to include the user selected values by replacing the ['Accounting']
part with the array variable holding your user selected values.
If you want to change the parameters after the dashboard has been embedded, you can use setParameters function call on your dashboard experience object (ie - the dashboard Const that you have in your sample code)
Regards,
Arun Santhosh