9 Replies Latest reply on Oct 25, 2017 9:45 AM by sgillard

    If requester is a member of a team/group

    sgillard Apprentice

      Is it possible to create an If statement, or something similar, to the workflow if the requester is a member of a team or in a group? 

       

      Example:

       

      Scott Gillard is requester and he's leaving the company

      He is on Team ABC  which has a special application only that team uses (XYZ)

      separation of employment workflow checks - If he's a member of Team ABC then create a task to the access administrators to remove access to XYZ application.  this is to avoid the task coming to them for EVERY separation ticket when only 20 people out of 4000  employees are on the team.

       

      I would think this is possible but I'm struggling to come up with an easy way to do this.

        • 1. Re: If requester is a member of a team/group
          YMoual Apprentice

          Hi Scott,

           

          There is a function called CurrentUserInTeam which determines if the user associated with the current session is a member of the specified team. So this means that it will check the user's teams of the user who is currently logged in.

           

          However in your case, you want to determine if a requester (who can be any user) belongs to a team or not. I am not aware of a function to determine a requester's teams.

           

          The only possibility I can think of now will be to get the requester's default team and check if == to the assigned SR team i.e. if Scott's (who is the requester) default team is ABC and the SR has been assigned to team ABC, then you could have a logical field which will be set to true if Scott's default team == SR team.

           

          The only issue here will be that Scott can belong to another team called XYZ and the SR has been assigned to XYZ. The above logic will not work since it only checks Scott's default team which is ABC.

           

          Not sure if this will be of much help to you.

          • 2. Re: If requester is a member of a team/group
            sgillard Apprentice

            Thanks for the input. Just to clarify.

             

            Scott, Steve, John, Sue, Sally  all have access to MSDN

             

            Scott leaves the company.  we want to create a task to the access admin team to remove his MSDN access.  

             

            However, the company has 10,000 employees. We don't want to assign a task for the other 9,995 people.   We only want the task to trigger if it's one of these people.  My thought was to create a MSDN user group. and if requester is a member of that group create the task.   And it is possible the requester would be HR.  So it might even need to be the "employee leaving" field  = member of group.

            • 3. Re: If requester is a member of a team/group
              YMoual Apprentice

              So why don't you add a workflow to this specific request offering which will create a task. When this request is submitted, a task will automatically be created and assigned to the MSDN team.

               

              You can add all the relevant information in the task details so that the MSDN will know what they have to do. Once this task has been completed, the SR will automatically be fulfilled.

              • 4. Re: If requester is a member of a team/group
                sgillard Apprentice

                Because I need to differentiate only tasks to the team when it has to do with those people listed.  Otherwise they get a task for EVERY separation of employment. they will get 100s of tasks they have to cancel just to catch the 12 people we care about.   If Mary  (not in the group/team) leaves the company and she's not one of the 12, they (access admin) would get a task for no reason. I'm trying create some kind of way to flag the workflow so that when the person is in a list, team or a group create the task. If they are not, skip.

                • 5. Re: If requester is a member of a team/group
                  YMoual Apprentice

                  Hi,

                   

                  Any luck with this?

                   

                  I have tried a couple of configurations to no avail. The only function which could have helped here is the CurrentUserInTeam but this function will determine the teams of the user who is logged in and not the requester (from a field). And of course determining the requester's default team won't be of much help to you.

                  • 6. Re: If requester is a member of a team/group
                    sgillard Apprentice

                    No I have not. I have also asked Ivanti engineers I'm working with for ideas. Hopefully they come up with a solution.

                    • 7. Re: If requester is a member of a team/group
                      YMoual Apprentice

                      Ok, please let me know if you find a solution to this.

                      • 8. Re: If requester is a member of a team/group
                        DTurner Specialist

                        Hi Scott,

                         

                        I think you may be able to achieve what you are looking for using a triggered action.

                        Setup a triggered action with the trigger to be on change of a certain flag (in your example they are a leaver, perhaps use an expiry date of some sort).

                        Then use a child fold for the conditional expression to check if they are a member of team ABC

                        $(ChildFold("Employee#",

                          RecId,

                          "StandardUserTeam#.Rev2",

                          "1",

                          "+",

                          "$(Team == 'ABC')") >

                          "0")

                        This should then only trigger if they are a member of that team, you can use this to call a workflow, update a field etc.

                         

                        Hope this helps

                         

                        Declan

                         

                        • 9. Re: If requester is a member of a team/group
                          sgillard Apprentice

                          I had a thought.  New emloyee field APPABC  - boolean.  Mark true for the 12 people.

                          In my workflow if APPABC is True - create a task.