cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Niels_T
Helper II
Helper II

How to set an auto-incremental ID to title column in sharepoint list

Hello,

 

I have a button that navigates me to the first page of a multi-screen lead form:

Niels_T_0-1631520168167.png

Set(varFormData,Defaults('Lead Form')); Navigate(Contact_Info_Page);

 

I have a field within my sharepoint microsoft list that is called Title and I would like to use this column to add id's that starts with 1 and gets incremented for each new row that is being added.

 

Would it be possible that whenever I click the "Create a new form" button that I immediately add a 1 to the Title column (and the next form 2, 3, ...)? 

2 ACCEPTED SOLUTIONS

Accepted Solutions
PG_WorXz10
Community Champion
Community Champion

Hi @Niels_T ,

 

Yes, it is possible.  I assume you will be updating the current items Title record or you want to add new column with title value 1. 

 

IF update is required:  UpdateIf(DataSourceName,ID=YourSelectedITem.ID,{Title:1})


If New record:  Patch(DataSourceName,Defaults(DataSourceName),{Title:1})

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

View solution in original post

eka24
Super User
Super User

I have a tutorial on autoincrement:

https://youtu.be/wsaMirkf3Pc

Hope it helps

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

2 REPLIES 2
PG_WorXz10
Community Champion
Community Champion

Hi @Niels_T ,

 

Yes, it is possible.  I assume you will be updating the current items Title record or you want to add new column with title value 1. 

 

IF update is required:  UpdateIf(DataSourceName,ID=YourSelectedITem.ID,{Title:1})


If New record:  Patch(DataSourceName,Defaults(DataSourceName),{Title:1})

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

eka24
Super User
Super User

I have a tutorial on autoincrement:

https://youtu.be/wsaMirkf3Pc

Hope it helps

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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