Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

adding and deleting records and creating unique IDs ( countRow )

(1) ShareShare
ReportReport
Posted on by

Hello,

I have an application that adds a new record to the list using Icon on OnSelect.

Palucci12_0-1719926364663.png

 

OnSelect: 

Set(varRespond, Slide14Addrow.Run(
 CountRows(ev_List_Sharepoint_MilestonTopIssue) + 1,
 "KXEO-01700"
));

But in the photo, as you can see, I also have a "X" to delete records, how can I do it (it can also be done using flow) so that these records are recalculated and show the rows in the POS column anew, i.e. when I delete 1, row 2 becomes 1.

 

Thanks ! 

Categories:
  • developingteal Profile Picture
    392 on at
    Re: adding and deleting records and creating unique IDs ( countRow )

    yeah, you need to make the POS column in sharepoint a calculated column - i believe there is a built in pkey like column which would meet your needs. It might be called autonumber but that could be dataverse and me getting things mixed up.

  • Palucci12 Profile Picture
    on at
    Re: adding and deleting records and creating unique IDs ( countRow )

    They are to be saved in SharePoint again, these are the values ​​entered in the POS column in SharePoint

  • developingteal Profile Picture
    392 on at
    Re: adding and deleting records and creating unique IDs ( countRow )

    is that for display or are you talking an column in a db? If it's just display you need to reset your display

  • Palucci12 Profile Picture
    on at
    Re: adding and deleting records and creating unique IDs ( countRow )

    I don't think we fully understood each other. I delete the row using Power Automate or Patch(). I have POS 1 POS 2 POS 3, I remove POS 2 and I am left with POS 1 and POS 3, . I would like to make POS 1 and POS 2. For example, using count rows it would count how many rows there are and update the item. or patch

  • developingteal Profile Picture
    392 on at
    Re: adding and deleting records and creating unique IDs ( countRow )

    I think you are using sharepoint as your data source - you can make a calculated column inside of sharepoint to recalculate it.

  • Palucci12 Profile Picture
    on at
    Re: adding and deleting records and creating unique IDs ( countRow )

    but what should I put in the POS column? in input ? I don't understand it well, the only problem is how to recalculate the number of rows in the list and change the values

  • developingteal Profile Picture
    392 on at
    Re: adding and deleting records and creating unique IDs ( countRow )

    use a patch function to delete the records, then reset the list or display you are using (or both) using Reset()

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,011 Most Valuable Professional

Leaderboard