Used “number of records” modulo “number of people” and a simple switch case. I then get the output and update it with basic automation “Update Record” :
let queryResult = await view.selectRecordsAsync({fields: });
let nbRdvPris = queryResult.records.length;
let arrayBizDev = [“Christophe”, “Thomas”, “Hugo”]
let nbBizDev = arrayBizDev.length;
let bizDev;
switch (nbRdvPris % nbBizDev) {
case 0:
bizDev = “Christophe”;
break;
case 1:
bizDev = “Thomas”;
break;
case 2:
bizDev = “Hugo”;
break;
default:
console.log(erreur
);
}
output.set(‘Business Developper’, bizDev);