Skip to main content
Question

URL button that checks a box and prompts to fill in another field

  • June 8, 2017
  • 0 replies
  • 75 views

I need to be able to have a formula button that will make some updates from a report page. The button will be used to decline a record. So the user will click it to decline, and then I would like a prompt of sorts that will have them enter a note. I don't want it to leave the report page. Simply check a box (which will be hidden) and then prompt for a note. 

I have the code to check the box as of now. I just need an adjustment to get the prompt to enter a note. Here is what I have so far.



var text url =

If([ED Fix]=false,
  URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
    "&rid=" & [Record ID#] &
    "&apptoken=cp2kg3vbugcf22bd656gmp4udhs" &
    "&_fid_48=true");

If([ED Fix]=false,
"<a class=\"Vibrant Danger\" href=\"javascript:" & "$.get('" & $url &
    "', function(){" & "location.reload();" & "});" &
    "void(0);\">Incorrect</a>"
)




Any suggestions? Thanks!
This topic has been closed for replies.

  • Quickbase Alumni
  • June 9, 2017
Are your notes a child record of the main 'record' that is declined, or will the note be in a text field on that record?

Either way you can have the RDR of the code be to open a pop-up window, that just has a spot for the note, and a save button.  

So when the button to save is clicked, it closes the pop-up window, and you continue down the report.
(You can add a refresh if needed too)

  • Quickbase Alumni
  • June 10, 2017
I'll do my best to describe this one.

You will need to make a Formula URL field with the following formula.

"javascript:var a=window.open(\""&[Master URL]&"\", \"newwindow\",\"width=600,height=500\"); setInterval(function() {if (a.closed) {window.location.reload();}},500);"

This will open the [Master URL] that you define in a new small window, and when the window is closed it will refresh the original page.

So you will want your [Master URL] to have the API_EditRecord function and the rdr that will be used in the pop-up.