Custom Add action in a table view

The story goes like this:

  • I have a table called “Events” and I heavly edited the “events_Form” system-generated view, including a custom “Form save” action that performs several related actions
  • Days later I created a slice called “Actives” for the Events table that include only active events, and changed the main Events table view to use this slice instead of the Events table.
  • As a consequence (and news to me), AppSheet proceeded to create a NEW set of system-generated views called “Actives_Detail” and “Actives_Form” , so now when I click on an event or push the Add button on the Events view, these new views are being called instead of the previous ones.
  • The problem with the detail view was solved by creating a hidden action on the Events table to call a view using LINKTOROW() and using this action on the table view “on row selected” setting.
  • To try to force the table view to call the old events_Form view, I hide the default Add action and created a new custom action called “addEvent” using LINKTOVIEW(). The button shows and when I click it the events_Form is shown, but when I save the record it just creates the record on the Events table but it doesn’t fires the custom action that was associated to the “Form saved” event.
  • I then tried to use LINKTOFORM() but then the addEvent button stop showing on the table view.
  • If I configure the addEvent button to “Open a form to add a new row to this table” then the button reappears but when pushed calls the “Actives_Form”.

So, there is any way for me to add a custom action to a table view that calls an specific form to add a record on a table?

TIA

Yes. Duplicate the system Add button and give it some custom name. This copy will retain all the settings of the system button. Set the behavior of the system Add button to FALSE to hide it. Now you can modify the custom add button and it will show anywhere the system Add button did. You can use a LINKTO…() function to always go to a certain Form view OR you can create conditional expressions to control which Form View the app navigate to.

I hope this helps!

Greetings sir! I apologize I know I am no help to your concern I see your an active community member I wanted to reach out in efforts to see if you had a spare moment to potentially help me with a little project I posted on info on my posts. As I am new I do not understand appsheet and the functions any help is appreciated If you have any spare moment thanks again sir!

I did that but without duplicating the default Add button, but creating a new action from scratch and using LINKTOVIEW() to load my old Form view.

Thanks.

That works too! Duplicating just makes it one step easier…at least in this case.