In my project, I'm unable to pass parameters to a page when it's opened. I need to pass parameters to that page can anyone please help?
1 Like
Hello @Transistor
I tried to pass multiple parameters to a page using a URL like this:
/alarm_card_view/:asset_name/:critical_count/:end_dt/:start_dt/:tag_path/:warning_count
But I'm getting a "view not found" error.
Can you please tell me:
- How to properly pass multiple parameters in the URL?
- How to call a script within the page using those parameters?
Thank you
In the page's config, did you create the page url with your params in it (ie. As you have here:
)
When you pass the params in, you pass their values directly into the url as strings like:
/alarm_card_view/asset3224/394/1748944895/1749944895/path%2Fto%2Ftag/23
Note: For the tagpath you will need to encode the forward slashes e.g. %2F
E.g.
import urllib
tagPath= "path/to/tag"
tagPathURL = urllib.quote(tagPath, safe='') # results in "path%2Fto%2Ftag"
url = urllib.quote("/alarm_card_view/asset3224/394/1748944895/1749944895/{}/23".format(tagPathURL))