Forum Discussion
MarkShnier__You
Qrew Legend
4 years agoThe generic format would be like this assuming that the other table is in the same app.
URLRoot() & "db/" & [_DBID_of the other table from advanced properties]
& "&_fid_10=" & URLEncode([field 1])
& "&_fid_11=" & URLEncode([field 2])
& "&_fid_12=" & URLEncode([field 1])
// this last line is optional and will cause the user to land on the record or report they started form when clicking as opposed to the newly created record.
& "&z=" & Rurl()
The URLEncode is required when the value being put into the URL might have any characters which are not A-Z or 0-9, as some of them don't travel through the magic of the internet. For example URL do not ever have spaces.
It a best practice to refer to the target table by its table alias from Advanced Properties of the table. That way if you copy the app it will still work. If its going to be a cross app ADD button then you will need to hard code the table code.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
URLRoot() & "db/" & [_DBID_of the other table from advanced properties]
& "&_fid_10=" & URLEncode([field 1])
& "&_fid_11=" & URLEncode([field 2])
& "&_fid_12=" & URLEncode([field 1])
// this last line is optional and will cause the user to land on the record or report they started form when clicking as opposed to the newly created record.
& "&z=" & Rurl()
The URLEncode is required when the value being put into the URL might have any characters which are not A-Z or 0-9, as some of them don't travel through the magic of the internet. For example URL do not ever have spaces.
It a best practice to refer to the target table by its table alias from Advanced Properties of the table. That way if you copy the app it will still work. If its going to be a cross app ADD button then you will need to hard code the table code.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------