Mishcatiu
Canvas Initiate

Update an item at the end of a column

Jump to solution

I am trying to update a status of an item by using the Update Items function under Sharepoint connector. However, the whole column is affected every time a new entry comes in. 

 

How can I specify that the item will only update the last entry in the list? 

Labels: (1)
0 Kudos
Reply
6 Replies
ghaiashish
Cloud Wanderer

Re: Update an item at the end of a column

Jump to solution

Hi,

The way to achieve this will need a few steps 

1) 'Query list' and capture all list item ids in a collection

2) Use 'count items in collection' to count the IDs and store in an integer variable

3) Use 'calculate value' to subtract 1 from ID count to get index and store in an integer variable to get index

4) Use 'Get item from collection' using the index variable to get the ID of the last item in collection from collection of IDs and store in text/integer variable

5) Update item using ID  stored in ID variable 

ghaiashish_0-1621001951552.png

Import below key in your tenant, and change connections to get the results 

 

QWdbpFcRNznsWETZjSFBweGmvesa8Mwff1uGbLfdd55EaTPPY

 

Let me know if you have further questions

Kind regards

Ashish

View solution in original post

0 Kudos
Reply
Mishcatiu
Canvas Initiate

Re: Update an item at the end of a column

Jump to solution
Hi,

Thank you for this. I have set the functions in the workflow but I haven't fully configured each action.

1. How to I count the IDs in the collection? It seems I can only add a condition under Query List. I am unable to identify the ID field on this configuration.
0 Kudos
Reply
ghaiashish
Cloud Wanderer

Re: Update an item at the end of a column

Jump to solution

If you want to query all the IDs in list just say ID>0

ghaiashish_0-1621479915476.png

You can import the workflow key I provided that gives you all configured action, you just need to change connection for your environment and that should work

0 Kudos
Reply
Mishcatiu
Canvas Initiate

Re: Update an item at the end of a column

Jump to solution

Screen Shot 2021-05-20 at 11.46.17 AM.png

It says error on importing. What did I miss. 

Thank you for the assistance, 

0 Kudos
Reply
ghaiashish
Cloud Wanderer

Re: Update an item at the end of a column

Jump to solution

It seems the key expired, try this

P7cKZ5MZ7zHrSsZ6iynWErL2JHYJNEyaCsTNZUjAxFyDREEaW

0 Kudos
Reply
Mishcatiu
Canvas Initiate

Re: Update an item at the end of a column

Jump to solution

I got it configures now. It seems I got one variable wrong. 

 

Thank you so much for your help! Youre amazing

0 Kudos
Reply