How to controll add edto view form for a slice?

Hi, my friends!

Happy new year!

I have a slice with filtered data.

I want to use a form for add new data entry and use another view form for edit data.

I have create 2 view form for my slice. In behavior section, Event Actions for view add select Add and for edit view select edit event action.

Slice actions in add edit and delete.

But, in a detail view, when I press edit button I see view form for add.

How can I controll them ?

Also when select auto for slice action. I have see all actions also two types of edit buttons

Solved Solved
0 1 209
1 ACCEPTED SOLUTION

I think the solution to this is pretty counterintuitive, but here goes.

To control which form you want the edit action to go to, make an action of the โ€œGo to another view within this appโ€ type. Then, use the following sort of expression in the โ€œTargetโ€ slot:

LINKTOROW([Lead Name],โ€œLeads_Form 3โ€)

In this case, โ€œLead Nameโ€ is the name of the โ€œkeyโ€ column of the table. โ€œLeads_Form 3โ€ is the name of the form you want to edit. You can then make the action look like an โ€œeditโ€ action (with the proper icon) even though its of a different type. Finally, you can control which actions appear either by deciding which actions are in the slice or setting up conditions for the actions.

Question for others: Wouldnโ€™t it be better for AppSheet to allow creators to indicate which form an edit action should open? That doesnโ€™t seem to be possible. It only says open โ€œaโ€ form. I wrote that the solution is counterintuitive because one has to abandon the edit action approach and make a different type of action as a workaround. Weird. (But I can imagine that this is a legacy of the days when edit actions were only system actions.)

View solution in original post

1 REPLY 1

I think the solution to this is pretty counterintuitive, but here goes.

To control which form you want the edit action to go to, make an action of the โ€œGo to another view within this appโ€ type. Then, use the following sort of expression in the โ€œTargetโ€ slot:

LINKTOROW([Lead Name],โ€œLeads_Form 3โ€)

In this case, โ€œLead Nameโ€ is the name of the โ€œkeyโ€ column of the table. โ€œLeads_Form 3โ€ is the name of the form you want to edit. You can then make the action look like an โ€œeditโ€ action (with the proper icon) even though its of a different type. Finally, you can control which actions appear either by deciding which actions are in the slice or setting up conditions for the actions.

Question for others: Wouldnโ€™t it be better for AppSheet to allow creators to indicate which form an edit action should open? That doesnโ€™t seem to be possible. It only says open โ€œaโ€ form. I wrote that the solution is counterintuitive because one has to abandon the edit action approach and make a different type of action as a workaround. Weird. (But I can imagine that this is a legacy of the days when edit actions were only system actions.)

Top Labels in this Space