Hi Leo,
I just tested with two context variables and both were displayed, so you should have no problem with three or four! It looks like the problem you are seeing is due to the quotation marks around your pageData key and value pair. I tried it a few ways just to be sure, but pageData values are referenced without quotation marks, while string values keep them. For example, I have a dashboard with two blocks and two context variables, one block is an indicator displaying a context string (string=before
), and the other block is a device list that is filtered by context tag companyName
. Device A’s companyName
is bmw
, and Device B is mercedes
. My dashboard is set up like so to begin with:
My workflow’s Custom pageData holds key
, value
, and string
:
Over in my experience page, I reference my pageData values like so:
{{element 'dashboard' dashboardId="5ced42b340db32000804f7c1" ctx=(obj companyName=(obj key=pageData.key value=pageData.value) string=pageData.string )}}
///key=companyName, value=mercedes, string=after
This line gives me my correct dashboard, yippee! The context variables are all correct, and the values have changed from my original dashboard. I now see Device B, which is tagged with mercedes
, and my string value of “after”.
This approach is ideal if all of your data is in pageData, but if you would like to directly pass in a strings as context variables, you can do as follows:
{{element 'dashboard' dashboardId="5ced42b340db32000804f7c1" ctx=(obj companyName=(obj key="companyName" value="mercedes") string="after" )}}
And my experience page looks exactly like the previous!
Please let me know if I can help further, or if anything is unclear
Thanks,
Julia