cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Check weekly if Department/Sub-Department/Location changed based on user profile

Jump to solution

I am building a site that will track a list of team leaders for each dept.

We dont have enterprise version so no query user profile

We have query LDAP but i'd like to avoid it if possible

 

Without using query  I want to be able to check if a person on the list has changed  either depts ,sub-depts, or office location based on their user profiel.

 

Here is what I have so far

 

On the SharePoint site have  fields for :

Office Location: The field is a single line of text

Department: The field is a single line of text

Sub-Department: The field is a single line of tex

 

After creation I built the workflow to "set field value" for  all 3 fields  using the person listed as "team leader"  user profile . 

example:

Set: Office location

Equals: user profile (

Source: Office  (was a drop down selection)

When: Account name (this was pre-set)

Equals: value <team leader name> (from item properties)

 

Can anyone guide me how I can build a second workflow to run once a week to store the current value for the 3 fields then compare to the users current info for those 3 on the user profile.

 

Thank you so much in advance

 

Labels: (1)
0 Kudos
Reply
9 Replies
Highlighted
Nintex Newbie

Re: Check weekly if Department/Sub-Department/Location changed based on user profile

Jump to solution

I forgot to add then I want the results emailed to me showing either no change at all or an email saying whioch person had a change

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Check weekly if Department/Sub-Department/Location changed based on user profile

Jump to solution

You could add another list with a "current" and a "history" field.

For example:

User - Department_History - Department_Current

  • Have a workflow populate the "Current" Field and check afterwards, if history and current are different. if yes -> Notify someone
  • Then overwrite the history field with the current value.

Or, if you dont care about the history entry:

  • Populate the a variable named current with the current value
  • Check it against the item field (no need for 2 fields in this case)
  • If different -> Notify
  • Update the field on the item
0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Check weekly if Department/Sub-Department/Location changed based on user profile

Jump to solution

Thank you. I dont care so much about historical values. The plan was it would check if there was a change then email me. I would have to do manual verification then update the record or change it.

 

The second option sounds good. Would you be able to show me more on how to set it up. Im still new yo nintex

 

Also on a side note since i have a single text field that gets updated initially by info pulled from user profile. Is that info dyanmic or static. Meaning if it shows active now if the persin leaves the company would the single line of text that show active automatically change to inactive (without nintex runing a workflow to update the field) or is it like a "snapshot" of whatever the status was when it initially ran

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Check weekly if Department/Sub-Department/Location changed based on user profile

Jump to solution

Hi,

 

Your list would look like this:

User (Person) - Department (single line of text) - your-other-fields (single line of text)

 

For each user in the list:

Read the current department of the user from the user profile and store it in a variable.

Check, if the department stored on the list is the same as your variables value.

If they do not match, notify someone and update the department field on the list.

else do nothing

 

Do this for each field you need. Please note that in this scenario you would receive multiple mails if multiple fields changed since the last time the workflow ran.

 

When you store data in a single line of text, it will not update by itself. So when you store the department from the user profile you will indeed get a "snapshot" of the field.

If you need your department to always be up-to-date, use a person or group field and display the department.

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Check weekly if Department/Sub-Department/Location changed based on user profile

Jump to solution

@milkdud1 .....If you don't have Query User Profile and you also want to avoid LDAP query, may I know how you'll get the current office, location, etc. information?

Reply
Highlighted
Nintex Newbie

Re: Check weekly if Department/Sub-Department/Location changed based on user profile

Jump to solution

I was able to get it from the user profile. I just put blank single text field in sharepoint. Then i used a regular update field value icone then selected user profile and the drop down contained info from the person

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Check weekly if Department/Sub-Department/Location changed based on user profile

Jump to solution

Thanks. I was able to populate the variable with current status and the single status. Which action do you use to check the 2 against each other.

 

Would you do a run if . The problem is i want to build this as a second seperate workflow.  Is there anway to make it run on the existing items without having to modify the items in the list. I know i can set it up as start qhen items modified but dont want to have to modify each item

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Check weekly if Department/Sub-Department/Location changed based on user profile

Jump to solution

As you said you want them to be checked each week, I´d suggest running a site workflow on a schedule for your case. The workflow would check each element using a foreach loop.

If you do not need the else case (f.e when the departments did not change) I would use a run if instead of a normal if.

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Check weekly if Department/Sub-Department/Location changed based on user profile

Jump to solution

Your site workflow would look something like this

  • Query list pull back all items (ID column) into a collection variable vCollIDs
    • For each ID in vCollIDs
      • Query list (filtered by ID) and pull back the single line of text columns and the person column into variables (vPersUser, vTextListDepartment, etc)
      • Query user profile of vPersUser and pull back department into separate variable vTextQUPDepartment etc
      • Run if vTextListDepartment <> vTextQUPDepartment (i.e. department has changed)
      • Email someone about the change

 

This should work but i would be careful with this depending on how many items in your list.  I have experienced time out issues with this sort of workflow when my collection is large.

View solution in original post

0 Kudos
Reply