Forum Discussion

MarkStenberg2's avatar
MarkStenberg2
Qrew Trainee
10 years ago

URL formula button to open pop-up box to collect data

I'd like to take a URL formula button which creates a new record and bring up a small window to collect a few fields of data which would then be written to the new record. Does anyone have any code for that?

15 Replies

  • no problem,

    URLRoot() & "db/" & [_DBID_PROJECTS] & "?a=API_GenAddRecordForm"

    Where I have [_DBID_PROJECTS] you would instead have the _DBID_ of your table - you get that from the Advanced properties of the table.

    You can do do this

    URLRoot() & "db/" & [_DBID_PROJECTS] & "?a=nwr"

    Do you need to pre-populate any fields or are you looking to just pop up a blank form?
  • M>no problem ... URLRoot()

    I think the OP wanted a modal PopUp dialog not the opening of a new page. This example from June 19, 2011 demonstrated how you can create modal dialogs in the style of QuickBase's Popup (click on Test1 and Test2 buttons to demo):

    MyPopDivs Not YourPopDivs
    https://haversineconsulting.quickbase.com/db/bfuw7wt8a

    Pastie Database
    https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=7


    Note that the code in the pastie and links points to the www subdomain not haversineconsulting as it was created before the great migration to UX2.
    • MarkSpringthorp's avatar
      MarkSpringthorp
      Qrew Trainee
      Dan, is this method still appropriate to use or is there a better way?  It looks exactly like what I need but when I look at the pastie, I'm unsure of what code to put where in QB. Appreciate your help, Mark
  • Can this be used in combination with jq-signature?

    I would like to add a formula url button to forms so that on click
    • a signature canvas pops up with a save button
    • a signature is drawn with stylus, finger or mouse
    • on click of save button the signature canvas is either converted to a standard sized image of some sort and saved in an attachment field or is converted to a data string and stored in a url field
    • after save return to form with signature shown
    Clicking the button again should allow for overwrite if the signer wants to redo.

    Here is the jq-signature page that I have been studying:
    http://bencentra.github.io/jq-signature/

    And here is another page that uses js/jquery.signature.js:
    http://keith-wood.name/signatureBasics.html
  • Thanks. I am interested in the process of using a url button and code page.
  • KellyBianchi's avatar
    KellyBianchi
    Qrew Assistant Captain
    I am using this for vehicle tracking. I have a table called 'Locations'. Every time the vehicle changes locations, I want to be able to click on this button, have it populate the date/time field, and open a new record that populates the related data. Is that possible?