cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
p6371174
Advocate I
Advocate I

Inserting row above or below other rows in a collection

Hi,

 

I'm working with converting an infopath form into powerapps. The problem that I try to solve is to achieve the same functionality as with infopath repeating table, where it was possible to insert a row in a repeating table below or above the current row selected. Is it possible to achieve this within a collection? And how?repeatingtable.png

Philip Saxegaard

2 ACCEPTED SOLUTIONS

Accepted Solutions
KrishnaV
Community Champion
Community Champion

Hi @p6371174 ,

 

Based on the input and your requirement I have implemented the solution, please see the below working model:

Inserting row above or below other rows in a collection.gif

I can share with you the solution if I meet your expectations.

 

I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.

 

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

KrishnaV
Community Champion
Community Champion

Hi @p6371174 ,

 

Sorry for the delay, here is the complete working code and feel free to as you needed for your requirement.

 

Happy coding in PowerApps.

 

I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.

 

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

10 REPLIES 10
eka24
Super User
Super User

Watch this https://youtu.be/vjfrXUa1Juw?t=5

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.

 

WarrenBelz
Super User
Super User

Hi @p6371174 ,

You cannot duplicate the functionality of these in a lot of areas, particularly the specific one you mention.

Galleries can be set up to edit items and write back to the data source and also to insert new records and do the same. This is not an "out of the box" function as by default, they are display only, however this can be done. Here is a Video from Paul O'Flaherty covering the subject.

 

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.

Thanks for answering.

 

I'm starting to believe this cannot be done. The video does not cover the ability to insert rows before/after existing rows in a collection. It only explains how to manipulate values in existing fieslds for existing rows.

Hi @p6371174 ,

You can actually write a new record from a gallery and then refresh the data source. where it "inserts" depends on your Gallery Sort order. You would use the syntax

Patch(
   YourListName,
   Defaults(YourListName),
   {
      Field1:Field1Value,
      Field2:Field2Value,
      Field3:Field3Value
   }
);
Refresh(YourListName)

and so on for the rest.

 

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.

 

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.

KrishnaV
Community Champion
Community Champion

Hi @p6371174 ,

 

Based on the input and your requirement I have implemented the solution, please see the below working model:

Inserting row above or below other rows in a collection.gif

I can share with you the solution if I meet your expectations.

 

I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.

 

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
KrishnaV
Community Champion
Community Champion

Hi @p6371174,

 

I just want to follow up with you on this issue to see is it resolved or still you see any challenges.

 

if you see any challenge/need further help let me know I am always happy to help.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Thank you for thios solution. Could you be so kind to share it with me?

 

Philip

KrishnaV
Community Champion
Community Champion

Hi @p6371174 ,

 

Sorry for the delay, here is the complete working code and feel free to as you needed for your requirement.

 

Happy coding in PowerApps.

 

I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.

 

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
KrishnaV
Community Champion
Community Champion

Hi @p6371174 ,

just a note: Please 2 empty rows using "+" Icon on top and then check the insert above and below functionality.

 

Feel free to let me know if you see any challenges/issues, always happy to help.

 

Regards,

Krishna


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (2,591)