How to create an action for Detail View to add new row to one row down?

Hello ever helpful Appsheet community! 

As Appsheet automatically puts newly created row to the very last, I often need to add rows in between rows. For that I want to create an action for Detailed View that would add newly created data to just one row down from the row I'm currently viewing in Detailed View and subsequently show the form to fill up the data. For example-

Screenshot (138).png

 In the above scenario row no. 5 is selected and being viewed in the Detailed View. I need an action that can create a new row in row no. 6 from the Detailed View and bring up the form to fill up the data (the same form that is showed when add button is clicked). How can I do that?

 

Solved Solved
0 3 80
1 ACCEPTED SOLUTION

Thank you once again for your help. I was able to achieve what you mentioned with the help of GPT-4.

For anyone interested in knowing how to achieve the same result, please do as follows-

  1.  Create and gave a name to action.
  2. In the "For a record of this table" section select your data table.
  3. In the "Do this" section select "App: go to another view within this app".
  4. In the "Target" section put "LINKTOFORM("TableName_Form", "Date & Time",
    DATETIME([Date & Time] + "000:00:01"))" expression where "TableName_Form"=Form view name (the table where you want this new data entry form to show up), "Date & Time"=your date and time column, the rest adds 1 second.

Note 1: Please remove quotation marks from the expression(formula) mentioned above.

Note 2: From Views>View Name>View Options>Sort by option I selected Date & Time column to simulate a scenario where all case entries with the similar dates are shown together.Note 2: From Views>View Name>View Options>Sort by option I selected Date & Time column to simulate a scenario where all case entries with the similar dates are shown together.

View solution in original post

3 REPLIES 3

The newest record is always added to the end of your data source and you can't change that.  But you are probably talking about the order on your app view and that you can change. If you have a DateTime column, you can change the order how you sort the view.

If you add a new row with an action, you could use the same DateTime value for the new record + one second.

Thank you so much. As per your instructions, I created a Date & Time column and filled all the rows with date and time. It would be a great help if you could elaborate the following process.


@AleksiAlkio wrote:

If you add a new row with an action, you could use the same DateTime value for the new record + one second.


 

Thank you once again for your help. I was able to achieve what you mentioned with the help of GPT-4.

For anyone interested in knowing how to achieve the same result, please do as follows-

  1.  Create and gave a name to action.
  2. In the "For a record of this table" section select your data table.
  3. In the "Do this" section select "App: go to another view within this app".
  4. In the "Target" section put "LINKTOFORM("TableName_Form", "Date & Time",
    DATETIME([Date & Time] + "000:00:01"))" expression where "TableName_Form"=Form view name (the table where you want this new data entry form to show up), "Date & Time"=your date and time column, the rest adds 1 second.

Note 1: Please remove quotation marks from the expression(formula) mentioned above.

Note 2: From Views>View Name>View Options>Sort by option I selected Date & Time column to simulate a scenario where all case entries with the similar dates are shown together.Note 2: From Views>View Name>View Options>Sort by option I selected Date & Time column to simulate a scenario where all case entries with the similar dates are shown together.

Top Labels in this Space