Skip to main content

Hello,

I have a list with items and it happens these items repeats. hence we have a "loop" column.

I wish that when I create a new item, on my form, the loop number get incremented automatically.

So basically, I just want to count the number of time my item already exist, so I can automatically define its loop= count(item)+1. Unfortunatly, the runtime function count don't seems to fill this purpose and lookup bring back only one of the duplicated row.

Is there any function to count an item in a list?

example:

In my list, I cleck on "+ New item" and in my form, I type in field "Item Ref Nb" 120204, with exist already in the list 3times. I want to display on the form, once I entered the value 120204 that a calculated value control display me the count of this item +1. Hence here, 4.

My List

Item Reference numberLoop
1202041
1245661
1202042
120204

3

You could use the List LookUp control and get a listview named myLastLoop

You should create that list on your list order descendent getting only 1 item.

Then use that view and filter by Reference Number


Ok, so what I did is create a column "Max_Loop" where a workflow comes and fill the item with their max count value each time an item is created.

Then on the form at item creation, I compare my reference with the list and if it exist, I read the Max_loop value and add 1. This value is then saved to the Loop field.


Reply