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 213
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