0 votes

Hello,

I want to perform a basic operation with array into a workflow. I just need to add a value into an array declared before.
I try to use push method but the following error message displays :
"Object does not handle property or push method"

//Declaration statement
var tUsers = VarArrayOf([UserID]);

//Add value statement (not working)
tUsers.push([31]);

Thank you for your feedback

Romain

asked in Efficy Designer (Conficy) by (115 points)

1 Answer

+1 vote
Best answer

Work with a native JS array first and only convert it to a variant Array when you need to use it on an Efficy API method.

var users = [Efficy.currentUserId]; 
users.push(31);

Efficy.setUsers(contextHandle, varArrayOf(users), false, false);
answered by (7.2k points)
selected by
Thank you for your quick feedback kristof !
1,225 questions
1,493 answers
1,828 comments
328 users