Hi!
I have a query that given a room ID it returns the total path for that room.
Code
def uns_get_path_by_id(provider, wc_id):
query = {
"options": {
"includeUdtMembers": True,
"includeUdtDefinitions": False
},
"condition": {
"path": "Enterprise/Plant/Section/*/Room01/ID",
"properties": {
"op": "Or",
"conditions": [{
"op": "And",
"conditions": [{
"prop": "value",
"comp": "Equal",
"value": wc_id
}]
}]
}
}
}
results = system.tag.query(provider, query)
if len(results) == 1:
return results[0].get("fullPath")
return None
However I have read some posts where they talk about the difference in efficiency between tag.query and tag.browse (post).
Is it possible to transform what I'm doing with system.tag.query to use system.tag.browse? My testing says is not, but some of you are really more smart than me so you maybe know something that I don't.
Thx in advance!