Adding a new record just after a particular record in a list
Hi Team, In my application I’m having a listview for showing a list of records. In each record there are a (+) button which can add a new record in the list. For this, I implemented a microflow where I fetched the list of record and set a count of the list. Next I created a object where I set the count+1 for the new record and change the object accordingly. Currently, the problem is when I click on the button, a new record gets added at the end of the list. But the requirement is like clicking on the button of the particular record a new record has to be added just after that particular record. For example, Let, I’m having a list: A + B + C + E + Requirement is to add ‘D’ in between ‘C’ and ‘E’. currently when I click on the (+) of ‘C’ , ‘D’ gets added after the ‘E’. Can you guys give me an idea how can I achieve this? Thanks & Regards, Tanmay Ghosh.
When you create the new record, you need to look at the sort order of your listview and create the record with attribute value(s) that will cause the new record to appear in the list just after the record where you clicked the Plus button. For instance, in your example above, you would want to create the new record with attribute value D (in the appropriate attribute) and ensure that your list view is sorted by that attribute.