New row action

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

2X_a_a1542a83009faaa7178d48a369ed0de9c91c24dd.png

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

2X_d_d65babafbd7480670f49ae6a46153d64fa9572d0.png

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?app...

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!

1 26 2,426
26 REPLIES 26

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.

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)?

Hi @Aleksi
Can i use linktoform to prefil more than one value? If yes what would the syntax look like?
Moreover, when i use add a row to a new table i esentialy disconect the new data from a parent table, meaning the data has no ref and therefore when a change is made in the parent table it has no influence on the child record?

Hi @1111!

I know you addressed your question to @Aleksi but perhaps I can help until he has time to respond.

Here’s a screenshot of an action where I use LINKTOFORM:

The expression is as follows:

LINKTOFORM(“All Cards_Form 5”, “Word”, [Word], “Definition and example”, [Definition and example], “Additional information”, [Additional information], “Image link”, [Image link], “Tags”, [Tags], “Translation”, [Translation], “Media link”, [Media link], “Short example”, [Short example],“Source”,[Source],“Question image”,[Question image],“Cram”,[Cram],“Cram only”,[Cram only],“URL”,[URL])

I’m moving a line from one table into another table with all of the same column names. However, if you follow the format, you should be able to determine the contents of multiple columns freely.

P.S. This action writes from the archive to another table.

Thanks

Sure. I hope this is OK.

“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.

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!

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!

Excellent!

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.

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

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

I have been working to accomplish the same thing in my app, however I am stuck at the point where I create the action item. When I pull up my form UX page I do not have the option to “Delete from import”. I have included the key during the LINKTOFORM copy process as mentioned previously. Are there any other settings that need to be configured to make this work?

Thank you all for any help!

Hi @Brannan_Holland! Welcome to the community!

I wonder if you are using a slice for the UX you are working on. If so, you need to make sure that the action has been added to the slice.

I am not at this time. I am very new to this. I will research how slices work and implement that.

Any advice on how to configure this slice would be greatly appreciated as well!

Thank you for your help!

Edit:

I was able to get the slice to filter out rows that have been copied to the new sheet using the formula below:

IN([Key], LIST(Terminated[Key]))

I have set the Slice Action to “Delete”, but it doesn’t seem to do anything.

When I click “View Data” under that slice it does come back showing the rows that have matching key values.

Thanks for your response. I’m having trouble diagnosing the problem. I mentioned a slice because, if you are using a slice, it’s easy to forget to add the action to it and that will cause the action to be excluded.

Perhaps if you could explain your situation in more detail (table names, screen shots, etc.) it will help us figure out what the problem might be. I’m hoping that others are reading this and will be able to chime in if I’m stumped.

The two sheets I am working with at the moment are the following:

Employee - This is where my active employees will be listed. It will have their name, contact, and other HR information. At this point I have everything working as needed for this sheet

Terminated - When an employee is terminated, I want to move the row from the Employee sheet over to this sheet. I have used the LINKTOFORM formula to copy the info from the Employee sheet to a from and then from there I have additional values to fill out. All of this is working as well.

What I am having a hard time working out is how to automatically remove the row from the Employee sheet once I copy it to the Terminated sheet

Before posting here I was not using slices. From what it appeared in the photos above, he was able to have a Event Action that deleted the old row when it was copied over to the new sheet upon form submission.

Below are a few photos from my AppSheet. I have not made any adjustments outside of the Action to copy the Employee row over to the Terminated Form.

I played with slices a little and was able to isolate the old value on the Employee form, but was not able to delete it using the slice.

Employee Sheet
2X_f_f52cb28894bea5ca35ada8cc1c5113102d105fec.png

Terminated Sheet

Copy Action

Thank you so much for your help! Please let me know if there is any other information that would help!

Thanks @Brannan_Holland! The additional explanation you have provided and the screenshots have really helped me.

Actually, I’ve been doing something similar in another app, using a different method. I’ll write a bit about that after I make some comments about your method.

Since you are using link to form and the keys in our two sheets are the same, you should be able to use the form to trigger an action that erases the data from the first sheet after it has been transferred. The form has a section like this:

2X_1_14d6fe106a153996084d03e7dd7fc2f6cd387583.png

I don’t have time to go into detail but you should be able to make an action to trigger a delete action that will erase the information on the table that was just copied.

By the way, what I do on an app I’m currently working on is to use the following action to do the copying to the new (“archive” in my case) table and then other actions to erase the data from original table:

This means that everything occurs in the background.

P.S. The new “Add a Row to a table” action came out after this thread started. So, I didn’t know about it at the time.

Ill give this one a shot!

Thank you for your help!

Top Labels in this Space