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

Community site session details

Session Id : re/KAv0Jv252XlN6j0e5HE
Power Apps - Building Power Apps
Unanswered

adding and deleting records and creating unique IDs ( countRow )

Like (1) ShareShare
ReportReport
Posted on 2 Jul 2024 13:21:16 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 02 Jul 2024 at 16:27:23
    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 02 Jul 2024 at 16:24:47
    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 02 Jul 2024 at 16:22:57
    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 02 Jul 2024 at 16:19:27
    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 02 Jul 2024 at 15:28:45
    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 02 Jul 2024 at 15:09:20
    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 02 Jul 2024 at 15:04:48
    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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!