Embedding a question wuith multi-valued parameter

I have a SQL question with a parameter that can have a list of values (multi-select widget in the UI).

I would like to embed this question in a application, and got it working as long as I send only one value for the parameter. But how do I format the params claim of the JWT to send multiple values for a single parameter?

The example apps all have a single parameter with a single value. In Metabase, when configuring the embedding of the question, I cannot select multiple values for the parameter so I am not able to get the example code to show me how to do it.

In other words, what would be the params claim of a JWT for a question with that kind of URL:
https://www.example.com/question/42?p=1&p=2

I’ve tried to associate a list to the parameter name (a Java list, which I imagine is converted into a json array), but didn’t work.

Thanks!
Romain

Hi @rthouvenin
You’re essentially seeing this issue - workaround in the second to last comment:
https://github.com/metabase/metabase/issues/9266 - upvote by clicking :+1: on the first post

Thanks! Yes this is the same issue, I was not able to find it before posting.
However the workaround is also what I tried (as I mention in the initial post) but it does not work for me. Wondering if it’s because this part may have changed since, as the issue was opened for v0.31.

@rthouvenin It still works fine. Can you post your code?
So I just did a quick test on my local test bench with Sample Dataset, with a question “Count from Orders” and sending "category": ["Gadget","Widget"], which gives me a result 10,000:
https://jwt.io/#debugger-io?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXNvdXJjZSI6eyJkYXNoYm9hcmQiOjZ9LCJwYXJhbXMiOnsiY2F0ZWdvcnkiOlsiR2FkZ2V0IiwiV2lkZ2V0Il19LCJpYXQiOjE1OTQ2MzUwMTAsIl9lbWJlZGRpbmdfcGFyYW1zIjp7ImNhdGVnb3J5IjoibG9ja2VkIn19.PVdM6GmpoK97AUYHQAhIY2kOQJgE7FrKgRmbhMu5u1Y

Interesting… When I made a second test to try out the debugger that you used (cool!), it worked fine :slight_smile:

It’s not the same metabase instance and not the same question, but same Metabase version. Or maybe I did something stupid. I’ll try to understand, but anyway I think my problem can be considered solved.

Thanks!

is it possible with free version of metabase or u need premium version for that?

@tejashri Yes, it’s possible in the Community Edition. Just note the issue already linked.