GPS History Block Select Devices by Experience Group Id

Is it possible to select devices for a GPS History Block using a context variable that is ctx.experienceGroupId-0? I know you can use ctx.exprerienceUserId-0, but I am wondering how to do this with ctx.experienceGroupId-0, as you can with the device table and event list blocks.

@Edward_Cline,

Right now, unfortunately no. What I can do is put in a feature request for this functionality. I’ll be sure to let you know if it gets released.

But, you can see all of the query options here:

Alternately is it possible to select devices for a GPS history block using any context variable other than ctx.experienceUserId-0? As example if we added a tag ‘parentGroupName’ to every device that was the name of the device’s parent experience group, then passed an experience group name into the page as a string context variable ctx.experienceGroupName-0, then would it be possible to setup the GPS history map block with a device tag query: parentGroupName={{ctx.experienceGroupName-0}}? I have tried this but the form won’t allow me to enter it as a query.

@Edward_Cline,

I think the missing piece here was the Device Tag Context Variable. Then, you should be able to do what you desire.

Sorry to drag this back up, but I dont see how to do this in the GPS history block. I have this “working” in the Device State Table, but dont see any way to do the same in the GPS block. Also would be great to add other standard query elements (like connection status, deviceClass, etc.).

I may have answered my own question, but probably the wrong way. I gave up on the deviceTag context and used a simple string context which allowed me to use an advanced query. It would be super great if the many different kinds of device queries had all the same features.

@David_Kjendal you certainly can use device tag context variables in the GPS History Block and as well as in advanced queries. See attached; there are two ways to do so …

  1. Choose “Select by IDs and tags …”
  2. Click “Aggregate data from multiple devices …”
  3. Select the checkbox next to your device tag context variable.


Or, in advanced query …

  1. Enter “tags” as the property name.
  2. Assuming your variable is named “deviceTag-0” …
    a. Enter “{{ctx.deviceTag-0.key}}” in the key field.
    b. Enter “{{ctx.deviceTag-0.value}}” in the value field.

Thanks Dylan, I missed the requirement to hit “Aggregate…” on the first one and on the second I couldn’t get the syntax correct - was using {{ctx.deviceTag-0}}.value - maybe just my ignorance, but I couldn’t find an example of that. Thanks again.

Fair point; the tag-type context variable is an odd one in that regard. It took me some futzing around before I had the syntax right to send to you as well. :slight_smile:

I’ll review our documentation and see if we can make that more clear somehow.