web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Line Count of SharePoi...
Power Apps
Unanswered

Line Count of SharePoint List Items & Reset options

(0) ShareShare
ReportReport
Posted on by 762

Hello Community
I need your help if possbile please

I am building a Customised form from a SharePoint list
In the form I Have a field called Sequential number, there is a calculation where when you add a new item the sequential number increases by 1 each time, it starts of as 0001

ClaireAllen_0-1660555822966.png

The defualt property of the Sequential number is

If(IsBlank(ThisItem.SequentialNumber),
Text(If(IsBlank(intTotalOfDocsOfSameType),
0,
intTotalOfDocsOfSameType)+1
,
"0000"
)
,
ThisItem.SequentialNumber
)

What I am trying to do, is if the users adds an item, then realises they have selected the incorrect document type for example, that the sequential number either re-sets or re-calculates 

Not sure how to do this, so any assistance would be great
Thank you 
Claire

Categories:
I have the same question (0)
  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    Why don't you move your logic to the update of the Document Type Update property and then if they change this it will change the sequential number.

     

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • ClaireAllen Profile Picture
    762 on at

    Thank you @phipps0218 
    I had not thoguht of that, so thank you
    I'll test it and see if it works how we would like it to

    Regards

    Claire

  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    No worries, please let me know if it meets your requirements. 

  • ClaireAllen Profile Picture
    762 on at

    @phipps0218 
    I'm not sure what I need to put in the onchage property of the document type asI already have a formula in that property.

     

    Set(txtSequenceMsg,"Calculating...");
    Set(bolCalculateSequence01,true);

     

    Would you be able to point me in the right direction?

    Thank you
    Claire

  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    On change property:

    Set(seqNum, If(IsBlank(SequentialNumber.Text), Text(If(IsBlank(intTotalOfDocsOfSameType),
    0, intTotalOfDocsOfSameType)+1,"0000"),SequentialNumber.Text)

    Essentially use your logic and set the sequential number to a variable. Then in the default property of the sequential textbox set the default to your new variable, in this example seqNum. 

     

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    @ClaireAllen did the above work?

  • ClaireAllen Profile Picture
    762 on at

    @phipps0218 ,

    Thank you for your guidance, I have tried updating the properties as suggested but the sequential number did not calculate to the next avilable number, it stayed at 0001 when a new item was added, it should have calculated to the next avilable number based on the line count of items, and when I tried to edit the item it did not do what I was expecting.

    Thank you & regards

    Claire

     

    Regards

    Claire

  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    Can you confirm that the variable did or didn't change? The label may need refreshing after we create the variable but you can check if the variable changed by viewing variables...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard