Discussions

Expand all | Collapse all

Formula URL syntax for form direction

  • 1.  Formula URL syntax for form direction

    Posted 12-18-2018 19:01
    I'm working on the second of 6 'products' that we're building, and we require a button that determines which form should be used based on the [PRODUCT] field.  If the product is X, then use this form when clicked, if it's Y, then use this form.  I've tried multiple 'IF' statements and can't come up with anything that isn't replete with syntax errors.

    I've scoured the community and haven't found anything yet that combines both an 'if' statement and the correct syntax for the URL..dbid_.... with which to direct the user.

    Could someone please point me in the right direction?

    Thanks so much in advance for any help received.


  • 2.  RE: Formula URL syntax for form direction

    Posted 12-18-2018 20:20
    Use one of two forms on the same table?

    Here's how the url breaks down including form id [fid]


    https://[domain].quickbase.com/db/[dbid]?a=dr&rid=[rid]&dfid=[fid]

    [dbid] is your database (app) id
    &a=dr is view record; a=er would be edit record
    &rid=[rid] is the record id of the record you're working on
    &dfid=[fid] chooses which form to use.

    So create a rich text formula field that will display as a button and use the if statement to pass the [fid] parameter based on your condition.

    Here's a thread with a little more discussion about doing pretty much exactly that:

    https://community.quickbase.com/quickbase/topics/link-button-to-open-specific-form

    For an alternative, if the forms are pretty similar you could use dynamic form rules to show/hide/whatever you need the forms to do differently. Form rules are a little more intuitively conditional than formula buttons.


  • 3.  RE: Formula URL syntax for form direction

    Posted 12-18-2018 20:26
    Followup comment, Kyle, if what you're having trouble with is the IF statement itself or more broadly the formula in your formula field, post the formula(s) as you have it, and the errors it's throwing, and somebody will usually be along to help you debug it.


  • 4.  RE: Formula URL syntax for form direction

    Posted 12-18-2018 20:23
    The reason however why I hate multiple forms is then the next step.,  You go to edit and then what form does it use?  You now need 6 edit buttons too.

    Hence i prefer to make Dynamic forms rules work.