LINKTOFORM to new row bug or user error? I h...

(Bellave Jayaram) #1

LINKTOFORM to new row bug or user error?

I have a Ref column and I want to configure a sequence of actions when the form is saved that has two actions:

  1. Write the value of that Ref column (BTW, the ref table’s key happens to be Datetime but the value NOW() is not accepted as the value to be written to the column. I had to make it CONCATENATE(NOW()))

  2. Go to the form passing in that value in LINKTOFORM. The exact formula I am using is LINKTOFORM(“Other Customer Log”, “Timestamp”, [_THISROW].[CustOther])

However, the second action is not working. Of course, that row doesn’t exist so I am expecting that the form will open regardless.

When I test the latter formula in the Expression Builder, I see control=Other%20Customer%20Log&defaults=%7B%22Timestamp%22%3A%22%22%7D which is showing a blank value is being passed for CustOther even though the previous action is populating that column.

App Name is CombinedOPTXSpliceLog-522895 To reproduce, you can open any row for Name Blake Young, clear the value for CustOther (if it is present) and save the form

@praveen @Aleksi_Alkio

(Tony Fader) #2

@Bellave_Jayaram Make sure you have a view named “Other Customer Log”.

(Bellave Jayaram) #3

@tony thanks. Yes, the view is actually called Other Customer Log_Form and I changed it but it still does not work. I tried removing the [_THISROW] and that did not work either. It seems that LINKTOFORM won’t open the form as this is a new row although it used to work before, I believe.

So now, I wrote a script that would get called after form save to write a new key to the Other Customer Log table and open the form with a URL such as{"Timestamp%3A"BEIi4hRS"}. This opens the form but still does not populate the Timestamp column (of type text) with the passed value.

(Bellave Jayaram) #4

BTW, I can get my script to work by using a URL such as http://…#table=Other%20Customer%20Log&row=JKBjNIk8&page=form so I think I will try that with action instead of LINKTOFORM()

(Tony Fader) #5

@Bellave_Jayaram Can you create an isolated example of this? LINTOFORM seems to work wherever I’ve tried it: - Linktoform Example - This app shows how to link to a form and fill in default values Linktoform Example - This app shows how to link to a form and fill in default values

(Bellave Jayaram) #6

Yes, in your example, none of the columns are of type Ref. I think that is the issue in my app. If you try to make one of the columns in Table1 be a ref to Table2, you should see what I am seeing.

(Tony Fader) #7

@Bellave_Jayaram In the share button example, it passes a ref value.

(Bellave Jayaram) #8

Okay, I see that but I am trying to go the other way, i.e., from Email to Products

(Bellave Jayaram) #9

So, with the script solution, we are seeing a screen that says a Duplicate Request is already in progress such as this

It stays for a minute or two but does go away and the view loads correctly.

(Tony Fader) #10

@Bellave_Jayaram I’m getting a bit lost. Can you recreate the issue on a simple, isolated app that doesn’t involve Google scripts?

(Bellave Jayaram) #11

@tony this is resolved as it turns out there is no need to do it this way. The ref mechanism is sufficient to create new rows.