Hello everybody, a question about expressions and arrays here. I have

Certified Associate Developer
Hello everybody, a question about expressions and arrays here.

I have a function that takes an array of users.

I have multiple arrays of users that I want to call my function on after applying a merge (ie: I want to call my function on the first element of each array, then the second of each array, etc etc). However the apply function treats the result of a merge as individual arguments instead of a single array object when calling my expression. Wrapping the _ placeholder in the apply function with curly brackets causes a syntax error as does casting the result of the merge to a user list.

Has anyone dealt with this before and if so how did you resolve it?

OriginalPostID-138030

OriginalPostID-138030

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer
    mschmitt: I'm not sure I follow what you mean by using the property function. It requires design time knowledge of the field name before it will work meaning I'd have to have an object specific version of the function.
    joshl: I have an several arrays of user IDs (the number of arrays is dynamic). I need to check if all the userIDs at index X across all arrays are active. Your suggestion of using the append function is a good one however I've already tried it and it still produces the same error - the function is seeing 2 individual arguments instead of 1 array argument.
    sachinr: Thanks for the suggestion but as above, I've already tried that and I'm still getting the same error.
    While I have already created a work around it is not as generic, useful or portable as I would like. Thanks for all your help everybody but it looks like this is going to be a "doesn't work" issue for the time being.
Reply
  • 0
    Certified Associate Developer
    mschmitt: I'm not sure I follow what you mean by using the property function. It requires design time knowledge of the field name before it will work meaning I'd have to have an object specific version of the function.
    joshl: I have an several arrays of user IDs (the number of arrays is dynamic). I need to check if all the userIDs at index X across all arrays are active. Your suggestion of using the append function is a good one however I've already tried it and it still produces the same error - the function is seeing 2 individual arguments instead of 1 array argument.
    sachinr: Thanks for the suggestion but as above, I've already tried that and I'm still getting the same error.
    While I have already created a work around it is not as generic, useful or portable as I would like. Thanks for all your help everybody but it looks like this is going to be a "doesn't work" issue for the time being.
Children
No Data