Discussions

Expand all | Collapse all

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

  • 1.  URL formula button to open pop-up box to collect data

    Posted 05-04-2015 20:31

    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?



  • 2.  RE: URL formula button to open pop-up box to collect data

    Posted 05-04-2015 20:37
    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?


  • 3.  RE: URL formula button to open pop-up box to collect data

    Posted 05-05-2015 13:13
    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.


  • 4.  RE: URL formula button to open pop-up box to collect data

    Posted 07-01-2017 22:35
    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


  • 5.  RE: URL formula button to open pop-up box to collect data

    Posted 07-03-2017 13:25
    That example uses the native QuickBase PopUp Dialog which looks like this:



    The example below uses the jQueryUI Dialog widget:



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

    They both work but you may find the jQueryUI Dialog more flexible if you want a more complex form.


  • 6.  RE: URL formula button to open pop-up box to collect data

    Posted 07-05-2017 14:00

    Thanks Dan, much appreciated!




  • 7.  RE: URL formula button to open pop-up box to collect data

    Posted 08-23-2017 21:11
    Do you think this will work if on a click this model shows up and on it have all the required fields showing up to create a new child record and when I hit save, a new record is added to parent?


  • 8.  RE: URL formula button to open pop-up box to collect data

    Posted 08-23-2017 21:47
    Yes if you modify the script to meet your needs.


  • 9.  RE: URL formula button to open pop-up box to collect data

    Posted 08-28-2017 13:51
    What is "var csvData = "";" and the function followed by it doing? 


  • 10.  RE: URL formula button to open pop-up box to collect data

    Posted 08-28-2017 16:28
    It is building up a string of csv data with newlines (ie \n) separating each line of data so that it can be posted to a table using API_ImportFromCSV.


  • 11.  RE: URL formula button to open pop-up box to collect data

    Posted 07-30-2017 14:34
    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


  • 12.  RE: URL formula button to open pop-up box to collect data

    Posted 07-30-2017 16:11
    Juiced has an add on for this. http://www.juicedtech.com/add-ons/sig...


  • 13.  RE: URL formula button to open pop-up box to collect data

    Posted 07-30-2017 16:38
    Thanks. I am interested in the process of using a url button and code page.


  • 14.  RE: URL formula button to open pop-up box to collect data

    Posted 07-30-2017 17:03
    I suggest contracting Dan Diebolt

    https://community.quickbase.com/quick...

    He has a working example in this thread.


  • 15.  RE: URL formula button to open pop-up box to collect data

    Posted 08-10-2017 00:28
    Dan, for the life I me I can't get "Test2" on "MyPopDivs Not YourPopDivs" to work, even in your example app. Test1 works fine, but not Test2.

    Is the button formula really:

    "javascript:var QBU_rid=" & [Record ID#] & ";" &
    "$.getScript('https://www.quickbase.com/db/bfuw7wt8a?a=dbpage&pagename=Test2.js');void(0);

    Sorry for being a java newbie


  • 16.  RE: URL formula button to open pop-up box to collect data

    Posted 10-02-2017 18:26
    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?