cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rsparks
Helper V
Helper V

Add an incrementally increasing ID to each item on a Sharepoint list

Every time a user makes a submission using the form I've got set up, the line ID just increases by 1 (just the standard sharepoint ID column). 

How can I set it up to increase by 11 every time?

1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Dual Super User II
Dual Super User II

Hi @rsparks 

 

WHat is the error? any error mesage or did it just not update the data

Did you check in SP?

 

If LineId is a text field then

 

Patch('New Vehicle Request', EditForm1.LastSubmit,{LineID: Text(EditForm1.LastSubmit.ID*11)});

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
RezaDorrani
Dual Super User II
Dual Super User II

Hi @rsparks 

 

The shsarepoint ID column is an internal column and will only increase by 1 each time

Your best bet would be to set another column as Line ID

 

What you can do is the formcontrol has an OnSuccess property

On OnSuccess add the following patch command to update the lineid

 

Patch(datasource, FormName.LastSubmit,{lineID:  FormName.LastSubmit.ID*11)

 

datasource - sharepoint list 

FormName - name of form control

lineID - name of column storing line id

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

 

Can't seem to get it working.

 

The code I'm trying to use is:

 

Patch('New Vehicle Request', EditForm1.LastSubmit,{LineID: EditForm1.LastSubmit.ID*11});

 

The list name is New Vehicle Request, the form name is EditForm1, and the column is called ListID. The list also contains the standard ID column.

RezaDorrani
Dual Super User II
Dual Super User II

Hi @rsparks 

 

WHat is the error? any error mesage or did it just not update the data

Did you check in SP?

 

If LineId is a text field then

 

Patch('New Vehicle Request', EditForm1.LastSubmit,{LineID: Text(EditForm1.LastSubmit.ID*11)});

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Working now, thanks

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,915)