Hi! I would like to have 2 prominent actions called โMake Store Visitโ and โEdit Store Informationโ. When you are in detail view for a row, I would like to hit the first button, and it opens a form view for that row, but fills in COLUMN 1 with โXโ, but when you hit the second button, it edits that row, but fills in COLUMN 1 with โYโ. How would I achieve this? Thanks!
I believe in general, you could create two different LINKTOFORM() actions with the syntax something like below
โMake Store Visitโ ACTION
LINKTOFORM(โYOUR FORMVIEW NAMEโ, COLUMN 1, โXโ, COLUMN 2, [COLUMN 2], COLUMN 3,[COLUMN 3]โฆ,COLUMN 20, [COLUMN 20])
โEdit Store Informationโ ACTION
LINKTOFORM(โYOUR FORMVIEW NAMEโ, COLUMN 1, โYโ, COLUMN 2, [COLUMN 2], COLUMN 3,[COLUMN 3]โฆ,COLUMN 20, [COLUMN 20])
The above expression assumes you wish to change only [COLUMN 1] values when you copy the forms. So other columns are copied with their existing value. If you wish to change [COLUMN 20] to say " Z ", then the expression will be
LINKTOFORM(โYOUR FORMVIEW NAMEโ, COLUMN 1, โYโ, COLUMN 2, [COLUMN 2], COLUMN 3,[COLUMN 3]โฆ,COLUMN 20, โZโ)
Hi! The problem I encountered with your fix is that it does not edit the row, it creates a new row with the same values. I know this because I have a UNIQUE ID Row as key, and it said as an error that that key had already been used. This was my dilemna.
I needed to edit the row, but fill in one of the values based on which button you push. I couldnโt use link to row, because I cant customize the column values, but I cant use link to form, because it adds a row, not edits the row. Is there any way im not thinking of to get around this? Thank you! @Suvrutt_Gurjar
Use an action of type Data: set the values of some columns in this row to set the value. Once the value is set, do you still want the user to end up in the form?
yes
but I also have workflow attached to this table
To both set the column and send the user, the first approach that comes to mind is to create an action to set the column value for that row, an action to navigate to the form view of that row, a group action that performs both of those actions, and use the group action as the button.
But, your workflow might be a problem. Tell me about the workflow.
The workflow triggers when the form is saved, and the column [New Store Visit or Edit?] is equal to โNew Store Visit (Will Send Email Report)โ. The first button, โMake a Store Visitโ, I want to go into the form with this option selected. My other button, โEdit Store Infoโ, is supposed to make that equal to โEdit (Wonโt send email report)โ. I have actions that eventually set the value of this column to โFinal Successโ After the workflow has run.
Ah, okay, so my first suggestion wonโt work.
Option #2:
Create two new form views, one for Make a Store Visit, and one for Edit Store Info.
Go to Data >> Columns and edit the configuration for the New Store Visit or Edit? column.
Set the Initial value expression to:
SWITCH(
CONTEXT("View"),
"Make a Store Visit",
"New Store Visit (Will Send Email Report)",
"Edit Store Info",
"Edit (Wonโt send email report)",
""
)
Note that Make a Store Visit
and Edit Store Info
should match the names of the form views created in step (1).
Set Reset on edit? to the expression:
IN(
CONTEXT("View"),
{"Make a Store Visit", "Edit Store Info"}
)
Again, Make a Store Visit
and Edit Store Info
should match the names of the form views created in step (1).
The Reset on edit? expression in (4) will notice when one of the form views created in (1) are in use, and cause the Initial value expression in (3) to be reapplied to the columnโs value. The Initial value expression will set the columnโs value according to the view currently in use.
User | Count |
---|---|
43 | |
32 | |
25 | |
23 | |
14 |