Dear Community
I have a table element, which allows for a given GroupId to change the RuleOrderPosition of a given DeviceId. When the RuleOrderPosition of a given DeviceId is changed, an API call is made to tell a backend that this device would like to take position 1. In return, JSON array is returned which all DeviceIds under the same GroupId, with all the positions of the devices after the “reordering”.
Sample Table
GroupId DeviceId RulePosition
123 ABC 1
123 DEF 2
456 ABC 2
Sample API JSON response
[
{
"groupId": "mesh-v5comafk",
"rule_position": 1,
"target_deviceID": "1716309666079x446097057805238300"
},
{
"groupId": "mesh-v5comafk",
"rule_position": 2,
"DeviceId": "1715954372676x418208516360372200"
},
{
"groupId": "mesh-v5comafk",
"rule_position": 3,
"DeviceId": "1716916430883x727679663294120000"
}
]
But I fail to build the rule to do so