Skip to main content
March 27, 2024
Question

Subtracting user list

  • March 27, 2024
  • 9 replies
  • 0 views

Hi All,

Is there a way to subtract the users in list 1 from the users in list 2 and return list 1 after subtraction?

    9 replies

    mathieud0001
    Brainy
    March 27, 2024

    Not sure if the question is worded properly but did you try the difference function? https://docs.appian.com/suite/help/24.1/fnc_set_difference.html 

    March 27, 2024

    Hi [mention:f5e81b8502fa4e77ad12697686a4fc56:e9ed411860ed4f2ba0265705b8793d05] , 

    The difference function is working fine here but when using list of users it does not give the correct output.

    mathieud0001
    Brainy
    March 27, 2024

    It works fine for me. Are you sure, your list of users is in the correct type?

    karumurua531442
    March 27, 2024

    hi [mention:9e801b4ea7ba47db8735359b555491e6:e9ed411860ed4f2ba0265705b8793d05]  may i know what is the type of user list you are holding ?

    March 27, 2024

    Hi [mention:3510a5189ce1477eaf2e09f5858c87e9:e9ed411860ed4f2ba0265705b8793d05] , the list is of type users.

    konduruc733182
    March 27, 2024

    Hello [mention:9e801b4ea7ba47db8735359b555491e6:e9ed411860ed4f2ba0265705b8793d05] 

    hoping that your lists are of same type, below is the code that I have tested and working. update the data values with your lists and verify.

    a!localVariables(
      local!data1: a!groupMembers(groupI11).data,
      local!data2: a!groupMembers(groupI12).data,
      symmetricdifference(local!data2,local!data1)
    )

    March 27, 2024

    Hi konduruc6445, unfortunately it is not working as well for the list of usernames.

    konduruc733182
    March 27, 2024

    Could you please share the data that you have in both the lists if it is not sensitive.

    davidj137213
    Brainy
    March 27, 2024

    Could you please share your code?