How do I set up different forms for the same table to open when accessed from different tables?

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

I have a documents table that is related to several different tables. I know how to create different forms for the Documents but I cannot get them to open when accessed from different tables. Is this possible? 

Photo of Amanda

Amanda

  • 10 Points

Posted 4 years ago

  • 0
  • 1
Photo of QuickBasePros_IDS

QuickBasePros_IDS, Champion

  • 4,464 Points 4k badge 2x thumb
When Adding a record to the Documents table from another table, you can encode the &dfid=xx into the URL of the button which will force QuickBase to use a specific Form.  You can also assign a Form to a Report, so that anytime a User Edits or Views from a report, the assigned Form will open (this also works on Embedded Reports).  However; if your users access the Documents Table and run a report that is not assigned to a specific Form, then the default-form for their Role will display.

Typically when I have table that is joined to multiple tables (like you describe); I put all the [Related Reference] fields at the top of the screen; and display them only when they are filled in.  This keeps the form clean, and indicates to the User where the record is attached to. 

If users are creating a new Document-record from scratch, I would show all the relationships; but only use this Form in ADD mode for all the Roles so that they only see this form layout with everything visible when adding a Document-record from within the table; and not from a parent-table record.
Photo of Amanda

Amanda

  • 10 Points
Thank you, I think that it what I need to do. How exactly do I encode that in the URL.. when I try to just tack it on I get a syntax error
Photo of QuickBasePros_IDS

QuickBasePros_IDS, Champion

  • 4,464 Points 4k badge 2x thumb
You can embed your dfid before your &rid=

Example: https://yourcompanyname.quickbase.com/db/bt43wd8mw?a=er&dfid=10&r=b4g&rl=fe4

Make sure you know your DFID (form id) number - the default one is usually 2, then it starts at 10, 11, 12 etc.
Photo of Amanda

Amanda

  • 10 Points
I cant seem to get this to work. This is the URL I have: URLRoot() & "db/" & [_DBID_DOCUMENTS] & "?a=API_GenAddRecordForm&_fid_15=" & URLEncode ([Task ID])& "&z=" & Rurl()    Where would the &dfid go?
Photo of QuickBasePros_IDS

QuickBasePros_IDS, Champion

  • 4,464 Points 4k badge 2x thumb
URLRoot() & "db/" & [_DBID_DOCUMENTS] & "?a=API_GenAddRecordForm&dfid=xx&_fid_15=" & URLEncode ([Task ID])& "&z=" & Rurl()
Photo of Amanda

Amanda

  • 10 Points
Sorry, one more question, what is this portion of the formula : fid_15 ... I think I messed some numbers up in some spots and I don't know how to find which number should be in that spot....
Photo of QuickBasePros_IDS

QuickBasePros_IDS, Champion

  • 4,464 Points 4k badge 2x thumb
To find your DFID (form ID); go to your Forms area in Settings of your Documents table.  There is a column on the right of the box indicating what ID# is assigned to each Form.

When you are adding a record to another table, and joining it; you need to populate the [Related Reference] field in the relationship in your Documents table with the value of the [Record ID#] from the table where you launch the [Add a record...] button.  This is the _fid_xx number.  To determine which field ID is the one you need to populate, simply go to your Relationships settings page, and find the relationship showing Tasks < Documents.  On the right side of that box, you will see the [Related Reference] field name (usually named "Related Task").  If you click on this Related Task field, the URL bar will show you what FID is assigned to that field name.  This is the number what replaces your _fid_15.  The logic of the formula is

"create a new record in the Documents table, and into FID 15 put the value [Task ID#].
Photo of Matthew

Matthew

  • 0 Points
Is there a way to open a different form based on a drop-down field's answer? Currently, I have a drop-down field at the top of a form, and using dynamic form rules, I am just hiding sections that are irrelevant depending on the selection in the drop-down field; it would be easier to manage if each choice in the drop-down field opened a different form.