Hi! Iโd like to ask if there is any documentation about the following kind of action:
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
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:
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.
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
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:
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!
User | Count |
---|---|
32 | |
31 | |
30 | |
18 | |
17 |