Our Knowledge Base covers a wide variety of technical topics, from the basic to the complex.
How do I create a link in one application that opens a new record data entry form in a related application with the key field pre-filled in?
Create a formula field of type "Formula URL - (Link)". Let's assume the first application is a list of action items, and the related application is a list of related files. Then you need to create a formula like the one below:
URLRoot() & "db/6k7gvdyw?act=API_GenAddRecordForm&_fnm_issue_id="
& URLEncode(ToText([Record ID#]))
for the "Formula URL - (Link)" in the issue application. The formula above presumes that the file application has a field called "Issue ID" of type "Numeric". The "Issue ID" field in the related application will be set to the "Record ID#" of the related record in the issue application.
NOTE: QuickBase recommends that you use application tokens when working with API calls (read more about tokens at https://www.quickbase.com/help/app_tokens.html).
You'll have to customize this formula with the field or fields in your application issue that you want to copy over to the related file application. As a minumum you'll want to copy over the key field (in this case Record ID#). But for convenience you may want to copy over some additional fields. You'll also have to determine the database id of the file application that will receive the "copied" record. Click here to learn how to find the dbid of a application:
Remember that all the parts of your formula have to evaluate to text so if you want to copy a numeric or a date field you have to convert it to text by using the ToText function.
Also if you have text fields that will contain characters like ampersand "&" or percent sign "%" then you need to URL encode this text first by using the URLEncode function.
If you want to make your formula immune to changes in the name of a field then you should use the field identifier method of refering to fields.
"https://www.quickbase.com" & "/db/6k7gvdyw?act=API_GenAddRecordForm&_fid_6="
& URLEncode([Company]) & "&_fid_7=" & URLEncode([Client Number]) & "&_fid_8
> =" & URLEncode([Analyst]) & "&_fid_12=" & URLEncode([Sales Rep]) & "&_fid_15=" & URLEncode([Type])
& "&_fid_23=" & ToText([My Date])
You can determine the field identifier by refering to the following FAQ:
You'll also most likely want to set the "Display Text" of the new "Formula URL - (Link)" field to something like "Add...".
You'll also probably want to create a Data Link field in both applications to make it easy to navigate between them.
In the example above the application link field in the issue application would have as its properties:
Name of the file database
The file application, data link field would have as its properties:
Name of the issue application
Browse by Category
Knowledge Base Categories
- Accounts (35)
- Application (45)
- E-Mail (7)
- Fields (41)
- Forms (20)
- Formulas (18)
- General (69)
- Other Product (7)
- Pages (1)
- Product (5)
- Reports (15)
- Roles (4)
- Search (1)
- Tables (6)