WAGO Cloud KQL select data from several devices

Hey hey,

if I add variable to dashboard ‘device_name’ to filter devices which I want to show data from:

devices
| summarize arg_max(updateTime, isDeleted, id, name) by id 
| where isDeleted == false
| project tostring(name)

I can show devices in a list to choose from:

How to get now filtered ids of the devices to use them in a queries?

~Damian