Can we use Query Params for an embedded app ( brick converted to an app) ?

Can we use Query Params for an embedded app ( brick converted to an app)?
I would need to collect the data ( Query Params) to my collection when embedded publicly using Query parameters.

Best Answer

  • ArborRose
    ArborRose Coach
    edited October 17 Answer ✓

    Yes, you can pass query parameters via the URL. But you'll have to code to capture the params. Something like

    https://instance.domo.com/app/myapp?param1=value1&param2=value2

    function getQueryParams() {
    const urlParams = new URLSearchParams(window.location.search);
    const param1 = urlParams.get('param1');
    const param2 = urlParams.get('param2');
    console.log(param1, param2);
    }

    Make sure you are not exposing any private or sensitive information through parameters.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

Answers

  • ArborRose
    ArborRose Coach
    edited October 17 Answer ✓

    Yes, you can pass query parameters via the URL. But you'll have to code to capture the params. Something like

    https://instance.domo.com/app/myapp?param1=value1&param2=value2

    function getQueryParams() {
    const urlParams = new URLSearchParams(window.location.search);
    const param1 = urlParams.get('param1');
    const param2 = urlParams.get('param2');
    console.log(param1, param2);
    }

    Make sure you are not exposing any private or sensitive information through parameters.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • @ArborRose Would be able to join a quick call so that I can explain my issue? I have tried all ways to collect the query params and it returns null value everytime.

  • @ArborRoseIt worked when I used appData= Salt+Lake+City as parameter