Question

Pass an external value to an embed URL as a filter

  • 10 December 2021
  • 1 reply
  • 75 views

Hi All,

 

How to pass arguments in public URL using embedded or is there a way to dynamically pass filter values and visualizations that are embedded via iframe?

Public URL:

https://cognizant.looker.com/embed/public/looks/srmYt3jFtVwtsHjPS4Bpfvxp3Xg5Qf8Z

 

Need like this url with value:

https://cognizant.looker.com/embed/public/looks/srmYt3jFtVwtsHjPS4Bpfvxp3Xg5Qf8Z?Cloud_Tag_Name=AL_PQ

 

How to pass the arguments. Is there any configuration required.

 

Thanks,

Badri 

 

 

 


This topic has been closed for comments

1 reply

Userlevel 2

Hi Badrinarayan,

You may want to use “Liquid” inside your  lookML to achieve this.

 

For instance:

dimension: cloud_tag_name {
sql: ${TABLE}.cloud_tag_name ;;
link: {
label: "Search"
url: "https://www.google.com/search?q={{ value }}"

}
}

 

You can find more information in this looker doc:

1.-

https://docs.looker.com/reference/liquid-variables

 

Doc with best practices to filter and  do a safe URL:

2.-

https://docs.looker.com/reference/field-params/link

 

In the #2, you can see the function “| url_encode”  in some liquid variables . I strongly recommend you to include this function in any URL generation, LOOKER DOCS for some reason skips this part in some examples.

 

Best regards,

Leo