How can I do so that when creating a new record for a referenced child table it takes me to a form created from a slice


I have this form where I register information in the parent table and additionally data is added to the child table, I am using slices to create different views for the user using the same data source from a single table, I cannot figure out how to change when I go to add a new record to the child table opens the form that I decide created from a slice, it automatically takes me to the form created by appsheet for this table.

I appreciate the help the community to guide me in this! Thanks

0 8 154
8 REPLIES 8

Please try below.

In the parent table , please add a reverse reference VC called say โ€œChild Table Form Sliceโ€ with an expression something like below. The column should be list type with element type as ref.

REF_ROWS(โ€œSlice Name on the child tableThat You wish to base Form Onโ€, โ€œParent Table Keyโ€)

In the referenced table setting of this column, please select the above slice name ( โ€œSlice Name on the child tableThat You wish to base Form Onโ€) .

You wil also have a system created reverse reference column in the parent table with an expression something like

REF_ROWS(โ€œChild Table Nameโ€, โ€œParent Table Keyโ€)

You could hide is in the parent table form where you wish the slice based child table form to open.

You can go a little deeper, because I tried to follow the instruction but still I donโ€™t understand very well what I have to do and how to make it work.

Assuming your parent table is โ€œOrdersโ€ and child table is โ€œOrder Detailsโ€, please

  1. Create a slice called say โ€œOpen Order Detailsโ€ on the child table โ€œOrder Detailsโ€

  2. Please create a VC in the parent table with name say โ€œRelated Open Order Detailsโ€ with an expression REF_ROWS(โ€œOpen Order Detailsโ€, โ€œOrder Idโ€)
    The other settings of this column are as below

Please ensure to include this column in the parent table form. Please replace names of parent table (in place of Orders) and child table ( in place of โ€œOrder Detailsโ€ and slice โ€œOpen Order Detailsโ€ as you actually have.

There must be something Iโ€™m missing because the ref_row doesnโ€™t appear in the parent form. I show you the step by step of what I did to see what I am missing:

1)This is my parent table and it is referenced by ID_FICHA to the child table that I show in the 2nd image

  1. Below is the child table and its ref to the parent table


  2. Then create Slices for the parent table and for the child table as shown below
    Parent Table Slice:

Child Table Slice
To validate that there was no problem, I left all the columns without a filter to avoid errors and then structure everything and rule out any errors.

then create the virtual column as you suggested:


I made sure that it is added in the slice

Create a form view for โ€œOrdenes de Compraโ€ which is the Slice created from the parent table called โ€œFichaโ€

Part 1:


Part 2:
as you can see add the virtual column that we created earlier

All the columns appear except the referenced one that we created.

Hello @Inventarios_FOODis, iโ€™ve reviewed your screenshots, you donโ€™t need a slice/form view combo for the parent table for this to work, only for the child.

  • On the child table: create the slice and the appropiate form view for that slice

  • On the parent table: a virtual column referencing the slice of the child table

Yes, but I need the Slice also the parent table because there are several views to have several functions from the same parent table and that is why I should also change the way the child table is displayed

@Suvrutt_Gurjar what do you think?

Thank you for all the details. I think your overall configuration looks okay.

You have created a conditional slice โ€œOrden de Compraโ€ on the parent table FICHA with row filter condition, [TIPO MOVIMENTO]=โ€œCompraโ€ . This condition could be an issue.

I think you may want to try first test by including the VC โ€œRelated Ficha_OCโ€ on the parent table form rather than parent table slice.

Also please take a look at the exactly similar implementation in the sample app below. The โ€œOpen Order Detailsโ€ slice on child table โ€œOrder Detailsโ€ and VC โ€œOpen Order Detailsโ€ in the parent table โ€œOrdersโ€ are similar implementations as yours. There is a slice โ€œOpen Ordersโ€ on the parent table as well. Please take a look at show_if on the VC โ€œOpen Order Detailsโ€ and filter condition of the slice โ€œOpen Order Detailsโ€ . You are also using a condition on parent table slice , so a similar condition may be needed on the child table slice as well.

Top Labels in this Space