Pass value in URL of a webapp
Madar
Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 6 ✭
I have different value that can be chosen in dropdown list in my webapp.
I also want to use the case where at least one of these value can be put in the url (or somewhere else). I then tried to do a query in the url like this :
https://your.dataiku.url/public/dku52/path/to/your/webapp?my_param=my_value
But unfortunately, it doesn't seem to work. Once the page is loaded, the my_param=my_value disappear and so i can't get it from the url.
So the question is, is there a working way (this one or another) to pass a value in the link with dataiku webapp ?
Tagged:
Best Answer
-
I was able to do it this way at the end.
But you can't test in edit mode, you can only test in view mode. So you can put console.log() to see what happen and go in view mode.
Here is the code I used to get the parameter :
const urlParams = new URLSearchParams(window.location.search); const param = urlParams.has('param') ? urlParams.get('param') : 'default'