Skip to main content
New Participant
Jun 18, 2024 2:04 PM UTC
Question

Compare and filter default groups from all groups

I am trying to create a file having all groups excluding the default groups. Default groups are the groups which are added to user account whenever any user is created like APN All Users, Application Users etc. I have created a constant with default user and trying below.

a!localVariables(
local!groups:rule!UAGR_getAllGroups(),
local!groups1:cons!UAGR_Default_Roles,
expression:union(
rule!UAGR_getAllGroups,
cons!UAGR_Default_Roles
)
)

    7 replies

    konduruc733182
    Inspiring
    Jun 18, 2024 2:54 PM UTC

    Hello [mention:3f6ee089926e49918b2fffdf40e4122e:e9ed411860ed4f2ba0265705b8793d05] 

    Union will return a combination of both the arrays. Use symmetricdifference().
    symmetricdifference() Function

    New Participant
    Jun 18, 2024 4:04 PM UTC

    I want to return all rows which are not in constant. In simple language, the roles which are in constant are the roles which should be removed from the roles returned from the expression rule.

    annap0005
    Participating Frequently
    Jun 19, 2024 5:36 AM UTC

    try with difference function.