Hoping for a tip on why this bot is copying in multiple rows, instead of copying 1 row for each employee with Shift Status=“On Shift”, it is copy the number of employees that are on shift and then using that number as a multiplier and adding a row for each employee.
So if 3 employees are on shift at the event time the Bot creates 3 rows for each employee. How do i limit the rows per employee to 1?
my json expression is:
{
"Action": "Add",
"Properties": {
"Locale": "en-US",
"Timezone": "Singapore Standard Time"
},
"Rows": [
<<START: SELECT(Employees[Employee],[Shift Status]="On Shift")>>
{
"Benefits Key": "<<UNIQUEID()>>",
"Benefit Employee": "<<[_THISROW-1].[Employee]>>",
"Benefit Type": "Meals allowance",
"Beneficial Date": "<<TODAY()>>",
"Beneficial Amount": "20000"
}
<<End>>
]
}
User | Count |
---|---|
18 | |
10 | |
8 | |
6 | |
5 |