Action to add new record, then edit the new record

Hi folks,

Seems like an easy one but I am struggling. I want a button that, when clicked, creates a new record then opens the record for editing. 

I set up an action to 'add a new row to another table using values from this row' as another thread suggested this for adding a record. This works well enough (despite my best efforts to build an awkward table schema) and adds a record. 

I set up a second action to 'open a form to add a new row to this table (not a row level action)' with the expectation that this is the next thing to do. 

I then used a grouped action to run action 1 then action 2.

Initial issues:

Action 1 runs, creates a record. Action 2 does not run.

The action button appears against all records inline where i only need it to appear in a single view and, more specifically, as a primary button in that view.

Any thoughts?

Solved Solved
0 2 82
1 ACCEPTED SOLUTION

Firstly, you can set up behavior on the action to make it only appear in one view. Use something like CONTEXT('View')='Name of your view'  in behavior. 

 

Any actions in a grouped action after a you link to a form will not work. You have a few options

  1.  Add a form save action to the form so that it links where you want. This is done by accessing the form view, then going to behavior, and selecting the action you want.
  2. If the row the same and you aren't changing anything in the form rather than using 'open a form to add a new row to this table (not a row level action)'  you can use 'add a row to another table using values from this row'  then you will have to manually specify all the columns from the original row. Then you can use this in a grouped action. The harder part will be getting the row that you want to show. I would recommend adding a timestamp column when adding the row (NOW() as the formula) and then you can use MAXROW() to pull the ID of the most recently added row and use a LINKTOROW(). This method will not open a form at all but would just copy the row and then link to the view for that new row.

View solution in original post

2 REPLIES 2

Firstly, you can set up behavior on the action to make it only appear in one view. Use something like CONTEXT('View')='Name of your view'  in behavior. 

 

Any actions in a grouped action after a you link to a form will not work. You have a few options

  1.  Add a form save action to the form so that it links where you want. This is done by accessing the form view, then going to behavior, and selecting the action you want.
  2. If the row the same and you aren't changing anything in the form rather than using 'open a form to add a new row to this table (not a row level action)'  you can use 'add a row to another table using values from this row'  then you will have to manually specify all the columns from the original row. Then you can use this in a grouped action. The harder part will be getting the row that you want to show. I would recommend adding a timestamp column when adding the row (NOW() as the formula) and then you can use MAXROW() to pull the ID of the most recently added row and use a LINKTOROW(). This method will not open a form at all but would just copy the row and then link to the view for that new row.

I'm sure this works as a solution, but i couldn't get it to work for me. More than likely the way i built the app, database or the even just my coding ability.

My workaround was to create an action button that creates a new record then just manually edit the record thereafter. Simple enough to do.

Top Labels in this Space