cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jp206
Frequent Visitor

Increment +1 all subsequent records upon new record creation

Hi, I have a sharepoint list datasource with a series of questions and an accompanying question ID number ('QID'. NB: This is a different column than the auto-assigned 'ID' column)

 

E.g

 

'QID''Question'

1

2

3

4

5

6

Question text

question text

question text

question text

question text

question text

etc

 

This is displayed to the user in a standard gallery, with some input controls alongside and a button to Patch in new questions to the list if needed.

 

Users may need to add a question which falls, for example, between 3 and 4 in the order. Currently, I'm attempting to write a function whereby the user would write their new question, and assign it QID: 3. This should then increment the QID for the current Q3 and all subsequent QIDs by +1, slotting the new q3 nicely into the order and moving everything after it up by 1 place. I am so far unable to come up with a working solution!

 

Any help or suggestions will be greatly appreciated. Thanks

2 REPLIES 2
eka24
Super User
Super User

Shane Young show this in a video:
https://youtu.be/plKw_xfVfwY

If you like this post, give a thumbs up. Where it solved your issue, Mark as a solution
jp206
Frequent Visitor

Thanks, but this doesn't answer my question I'm afraid. This just adds an item on the end of the list with the last ID# + 1.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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,927)