6 Replies Latest reply on Jun 12, 2016 3:50 PM by dmshimself

    Create User Object type as attribute of change

    Apprentice

      I want to have a user select their supervisor when creating a change, how do I create a attribute in the change that is related to Object Type User, similar to the RaiseUser attribute only with a different name?

        • 1. Re: Create User Object type as attribute of change
          John Stuart-Robson Employee

          Hi Ryan,

           

          You want to drag User from the System module onto the Change Object in object designer.

           

          You will then be able to name it accordingly, then save.  It is then ready to add to the window.

           

          Thanks

           

          John

          • 2. Re: Create User Object type as attribute of change
            Apprentice

            Can you default that value in the window to a specific user based on the RaiseUser?

            • 3. Re: Create User Object type as attribute of change
              John Stuart-Robson Employee

              You can use copy rules to copy a value from the user record yes.  But it gets more difficult if you want to get Manager or Line Manager from RaiseUser


              Thanks

               

              John

              • 4. Re: Create User Object type as attribute of change
                Apprentice

                Thanks you.  I have narrowed it to only Manager, through AD Data import mappings.  Unfortunately, through some conversations, this may not be up to date.  I had a wild idea to default a user selectable object type of user to the RaiseUser's Manager.  Otherwise we will have to rely solely on the RaiseUser to choose their direct manager.  So when you say more difficult, does that mean impossible, not a good idea, or just complex?

                 

                -Ryan Pigford

                P.S. Thanks for following along with me.

                • 5. Re: Create User Object type as attribute of change
                  wamccoid Specialist

                  I have done this for customers a few different ways.  We usually map the AD Manager to the Manager attribute for User.  Then we create amother user relationship and call it supervisior or something like that and then make a gadget in self service or workspaces with a nice report template with a button to set the supervisior.  Still makes the end user set their own manager, but it is a one time thing and not for every record.  Hope this helps.

                   

                  Thanks,

                  Will | Lead ITSM Consultant | Network Consulting Services, inc. | Desktop, Network & Internet Security

                  1 of 1 people found this helpful
                  • 6. Re: Create User Object type as attribute of change
                    ITSMMVPGroup

                    If your AD were the definitive source (and I appreciate from your comments it may not be), then this is fairly easy.  You import the AD manager object into an LDSD string attribute called (say) AD Manager on the user record in LDSD and it should have a CN= type contents. Create another user attribute on the user record called manager (there might actually be one there already) and run another import after that which just imports into this manager attribute and uses the key field of AD Manager to match to the LDSD user and away you go.

                     

                    You can also use SQL to match this up, something like ...

                     

                    create procedure sp_SetUsermanager AS

                    begin

                      declare @userguid uniqueidentifier

                      declare @managerdn varchar(256)

                     

                     

                      declare UserCursor cursor for

                      select tps_guid,usr_managerdn from tps_user where usr_admanager is not null and tps_deleted=0

                     

                      open UserCursor

                      fetch next from UserCursor into @userguid, @managerdn

                      while (@@FETCH_STATUS = 0)

                      begin

                               update tps_user set tps_manager_guid = (select tps_guid from tps_user where usr_dn = @managerdn and tps_deleted=0) where tps_guid = @userguid

                               fetch next from UserCursor into @userguid, @managerdn

                      end

                     

                     

                      close UserCursor

                      deallocate userCursor

                    end

                    1 of 1 people found this helpful