New row action

Hi! I’d like to ask if there is any documentation about the following kind of action:

58

To avoid asking a stupid question that has already been answered, I’ve tried to look through the documentation on actions but wasn’t able to find an explanation that dealt specifically with “Add a new row to this table (not a row-level action)”. Unless I’m mistaken, there doesn’t seem to be a documentation page that functions as an index to each type of action. I looked at

but couldn’t find a reference to this action there.

By the way, the relationship between actions mentioned there and the names for the action that we see in our editing interface could be better. For example,

3] Copy row
Copies the current row and opens it in a form view.

sounds like LINKTOVIEW but one might also imagine it to be a reference to

28

which is another action for which a clear explanation would be helpful.

I think the lack of consistency in terminology and a straightforward index of actions that matches what we see in the editor are important documentation issues.

My interest in actions that make new rows stems from my desire to build an action that transfers data from one table to another.

I’ve found some explanations about how to do this. For example, @Phil has the following article about how to use a Webhook and the API to copy newly added records from one table to another:

On my app, however, I think I’d like to avoid external integrations and API because I’d like my app to be a prototype that anyone can copy and use for free right out of the box, so to speak.

Another important bit of information I’ve found is about LINKTOFORM:

I think LINKTOFORM is what I’ll wind up using in my app. There seem to be some webinars about LINKTOFORM on YouTube

and one of them took me to this sample app:

https://www.appsheet.com/samples/This-app-shows-how-to-link-to-a-form-and-fill-in-default-values?appGuidString=ad497f8e-7d8a-4664-8a4a-43c202bb6126

So, that’s what I’ve been able to find so far. I realize that “Add a new row to this table (not a row-level action)” is probably not what I want, but I’d be curious to learn more about this action – how it is intended to be used and how it is different from or related to the row-adding options I have mentioned above. Thanks in advance!

The main difference between these “Add a new row to this table” and LINKTOFORM is simple… with the “Add a new row to this table” you can just add a new record in a same way than system generated “Add” action. It just open the form view. With the LINKTOFORM action you can prefill values as you wish.

1 Like

Thanks! In that case, I definitely want to use the LINKTOFORM action.

By the way, does LINKTOFORM also do about the same thing as “Copy this row and edit the copy” (the second choice in my app editor)?

“Copy this row and edit the copy” will copy all possible values where LINKTOFORM prefills values as you wish… you can copy those values or you can rewrite them.

1 Like

Thanks!!!

You’re welcome

Thanks! One more question, if you don’t mind. I’ve gotten the LINKTOFORM to work. It’s quite easy to work with if all you want to do is copy data. Actually, though, instead of “copying” data, I’m interested in “moving” data. In other words, after copying to the new table, I want the row in the old table to be deleted. Because the LINKTOFORM action seems to interrupt my grouped action. After “saving” I’m sent back where I came from but the “Delete” I have in my grouped action doesn’t occur. If possible, I’d like to have the delete occur in the background and to be automatically sent to the deck view, not the detail for the row I just copied / moved. Is that possible?

P.S. I searched for “LINKTOFORM” and “delete” but couldn’t find anything.

It should be doable if you copy the key column’s value with your LINKTOFORM. When you save it, you can trigger the delete action with Event action when you know correct row’s key value.

Thanks! I suspected that a workflow rule would be the answer. I’ll work on it! :sweat_smile:

I got it to work. The workflow rule takes a few seconds to work. Since I don’t want the user to see a record that is going to disappear soon, I had to make a slice so that the disappearance of the record from the deck view would be immediate. Thanks again!

1 Like

Excellent!

1 Like

After writing this, something I saw in a post from @Lynn led me to a solution I like even better. The following options in the form view allow me to erase the record from which the data was copied and then go to the deck view instead of back to the card that has been erased.

and

So, in this case, I don’t need the workflow rule.

Thanks to both @Aleksi and @Lynn for your help. I now feel quite satisfied with what I have. :slight_smile:

2 Likes

Maybe I didn’t explain my idea deep enough. This is what I was thinking :grinning:

I just didn’t know what an event action was. Now I do. :wink: Thanks again!

:+1: