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
    In my specific example I have a dynamic number of CDTs, each with several userIds. I need to check each CDT to determine if any of those userIDs are inactive within the system.
    Unfortunately I need perform this test on several different types of CDTs each with a different number of userIds.

    I have written a single expression which, given a dynamic number of user Ids, will return the number of active logins. My issue arises when trying to apply the function.
    Specifically I receive an error message stating that the expression expects 1 parameter but received X (where X is the number of userIDs I am testing at the moment).
Reply
  • 0
    Certified Associate Developer
    In my specific example I have a dynamic number of CDTs, each with several userIds. I need to check each CDT to determine if any of those userIDs are inactive within the system.
    Unfortunately I need perform this test on several different types of CDTs each with a different number of userIds.

    I have written a single expression which, given a dynamic number of user Ids, will return the number of active logins. My issue arises when trying to apply the function.
    Specifically I receive an error message stating that the expression expects 1 parameter but received X (where X is the number of userIDs I am testing at the moment).
Children
No Data