Programmatically select qSearchBar topic

We have a scenario where we would like to programmatically select the topic in the q search bar embedded for anonymous users. We could do this by specifying an initial topic id when generating the embed url. But this means that every time we want to switch the topic we need to generate a new embed url.

Is there a way to programmatically switch the topic without generating a new embed url?

Thank you!

Hi @ionut and welcome to the QuickSight community!

I believe if you want to change the topic Q is referencing, it will need to be a different embed url. Although, there is the boolean option to allow topic selection which may bypass that issue.

Now if you want to update the question presented to the topic on load, then that should be able to be managed through the API. You could utilize this command embeddedQBarExperience.setQuestion('show me monthly revenue'); to set a default question that the user could then update on load.

Let me know if this helps!

1 Like

Hi @Brett ! Thanks for the response!

I have seen the allowTopicSelection boolean option, but this controls whether the user can change the selected topic. We would like to change the topic programmatically.

The setQuestion() action we are already using, but I could not find an action or a way to change the topic.

Hi @ionut,
Understood! Yes, I believe programmaticallly selecting a topic is a current limitation so I will mark this as a feature request so that our support team can get eyes on it!

Thank you

1 Like