cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Schedule site workflow to update list items

Jump to solution

Hi,

I have a list that shows who's off today in the office.

For this list to display correct records, a today's date field should be updated based on daily bases at 8 am each morning.

The new  schedule feature added to Nintex allows to run a site workflow at desired period..

The issue is that I am not able to configure the workflow properly to update the "Today's Date" field of all items of the list "Daily Leaves".

Based on similar questions asked in this forum, I created the below workflow which is completing successfully but without any change in the fields.

I think something is not correct in my configuration.

Anyone can help guiding how to configure the below actions to preform the update correctly?

Thanks

Hassan

0 Kudos
Reply
9 Replies
Workflow Hero

Re: Schedule site workflow to update list items

Jump to solution

Hi ‌,

Are you using any filter conditions in 'Query List' action and . Can you share its screenshot?

Thanks,

0 Kudos
Reply
Workflow Hero

Re: Schedule site workflow to update list items

Jump to solution

Hi,

The filter is set to select all list items. Please check below screen shots:

Thanks,
Hassan

0 Kudos
Reply
Workflow Hero

Re: Schedule site workflow to update list items

Jump to solution

Hi ‌,

Select 'ID' from columns to select instead of 'TempDate' and store it in 'col1'

For each 'lidListId' from 'col1' update 'TempDate' with today's date.

Thanks,

Reply
Workflow Hero

Re: Schedule site workflow to update list items

Jump to solution

Thanks Lakshmi

I changed the query list as you mentioned.

my conf of  For each  loop is as below:


and below is the conf of the update list item;  I used the field "is current version" in the Where since

this condition is always true for all items.

Updating the Tempdate to  "use  date when actions is executed" should be OK since this workflow will run daily.

 

Still no changes are made in the list. What I'm still missing ?

0 Kudos
Reply
Workflow Hero

Re: Schedule site workflow to update list items

Jump to solution

Hi Hassan Dhainy‌,

'For each' and 'Update Item' action configurations are correct, I hope workflow variables 'coll1' is of type collection and 'currentID' is of type 'List Item Id'. You can use 'Log In history' action and insert 'coll1' to see what items it is getting from the list.

Thanks,

Lakshmi C

Reply
Workflow Hero

Re: Schedule site workflow to update list items

Jump to solution

yes the coll1 is of type collection. but the currentID type is text; i tried it as number type but the wrokflow got suspended.

0 Kudos
Reply
Workflow Hero

Re: Schedule site workflow to update list items

Jump to solution
Reply
Workflow Hero

Re: Schedule site workflow to update list items

Jump to solution

Thank you for your support. Checking the reference and will workaround.

0 Kudos
Reply
Workflow Hero

Re: Schedule site workflow to update list items

Jump to solution

Ok, here's how I have the pieces:

Here are my variables:

Here's the query list action:

Here's the For Each Loop:

And here's the update list item:

So, we're querying the list and getting a collection of all the IDs in that list. If we were to log that collection variable (collID) we would get something like this:

Now, for our for each, we're saying "for each item in this collection (so for each ID), we want to know the ID of the item we're on, so we're gonna output "individID" as our text variable that will be the ID of the item we're currently on. For example, if our collID was [1, 3, 4, 6] because some items got deleted, on the first loop our individID would be 1, then 3, then 4, then 6. By using this ID, we can basically use that to tell our list which item in the Leave Form list we want to update. We want to update the list item where the ID of the item is equal to our variable individID.

So our list looks like this to start, with some random data:

Then we run our workflow:

And the logs look like this:

And then our list looks like this!

Reply