Can I use an input box to ask the user to provide a value when clicking a custom url button?

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

I have a custom url button that, when clicked, edits a record and time-stamps a "Date Submitted Field." After this is done, the user has to open the same record in edit mode, and add another piece of information (an invoice number).

What I'm looking to do is to have the same custom url button above ask the user for that invoice number in a pop-up input box, and then have the entered value added to the record programmatically to save the user the second edit step.

Is this possible?

Thanks in advance.

Photo of Juan

Juan

  • 480 Points 250 badge 2x thumb

Posted 3 years ago

  • 0
  • 1
I can't help you with a pop up box.  How about a button to set the date submitted to today and then open up the form in edit mode a position the screen (if its a long form) to near that invoice number field.   Or, edit the record and redisplay the form in edit mode on a super mini alternative form with maybe a identification of the record at the top (say Order number / Customer name) and just 1 input field for the invoice number.  So not a pop up but just a stupid simple mini form.
Photo of Juan

Juan

  • 480 Points 250 badge 2x thumb
Thank you so much for that suggestion, I'll set it up that way for the time being.
Photo of Juan

Juan

  • 480 Points 250 badge 2x thumb
Replied instead.
Photo of Juan

Juan

  • 480 Points 250 badge 2x thumb
Ok, I set it up the way described above, but I ran into another issue.  When users click the "Save" button on the mini-form, they are redirected to the standard form in view mode.

I should mention that my custom button is on a report that is displayed in the user' dashboard.  From that report in their dashboard, they click a button that edits the record, time-stamps it, then displays the mini-form in edit mode for the user to enter the invoice number.

What I want to happen is for the user to be redirected back to their dashboard when they click save.  Here's what my formula looks like right now:

var text URLONE = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#] & "&_fid_102=" & Today();
var text URLTWO = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & [Record ID#] & "&dfid=15"; //This opens the mini-form in edit mode

var text url = $URLONE & "&rdr=" & URLEncode($URLTWO);

$url

How can I modify my formula so that when the user clicks Save on the mini-form they are redirected to their dashboard?

Thanks in advance.
I don't have time to test this right now, but can you try this.

var text URLONE = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#] & "&_fid_102=" & Today();
var text URLTWO = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & [Record ID#] & "&dfid=15&nexturl=" & URLEncode("/db/xxxxxxx?a=showpage&pageid=5)";

var text url = $URLONE & "&rdr=" & URLEncode($URLTWO);

for the xxxx put in the application url and I'm not really sure if the ?a=showpage&pageid=5 is required.  Obviously you would put in the page number of your Dashboard. One way to get that is to Customize this page on the dashboard and observe the URL.
Photo of Juan

Juan

  • 480 Points 250 badge 2x thumb
It worked! Thank you!!

The only other modification I had to make was in the placement of the quotation marks after &pageid=5)"

I changed it to &pageid=5") and it worked perfectly.

Thanks again!
One more hidden secret of Quickbase revealed ..... good to know it works.
Photo of Justry Weir

Justry Weir

  • 10 Points
Can someone point out the section of the above code that is actually prompting for and applying the input value to the field for the edit call?  I am attempting to do something similar but am not seeing how to take from the code above and apply it to my logic.  

I am looking to modify the below logic to accept a numeric user input (quantity) and apply that value to a field in my add record form.  

I am also looking to modify this to do the following.

1.  Find a record in the target table and modify a quantity based on the users input value.
a. Button is being used in the source table for the relationship to the related record in the target table.
b. I am also looking for the edit API call to just modify the record without opening up a form that has to be saved.
2. Add a new record in the target table using the users input value.


URLRoot() & "db/" & [_DBID_INVENTORY_TRANSACTIONS] & "?a=nwr&"&"dfid=11" &
"&_fid_45=Consume" &
"&_fid_13=" & URLEncode ([Record ID#]) &
"&_fid_21=" & [Related Item Master] &
"&z=" & Rurl()
... this is a complicated multiple part question.  I suggest that you post your question(s) as a new Question(s) and if you like refer to this post here with a link.
Photo of Justry Weir

Justry Weir

  • 10 Points
The nature of the question is such that it will probably require some one on one consulting time to get this working for you. Feel free to contact me via the information in my profile where we could look at your app together and I would get an understanding of what you are trying to accomplish here.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
If you want a popup dialog to solicit additional information from the user before performing some other action you can use the technique demonstrated in this example:

Hylo[morphism] Technique ~ Click With Dialog Button
https://haversineconsulting.quickbase.com/db/bkw2ff3c8



and explained in this question and answer:


What is the Hylo Technique?
https://quickbase-community.intuit.com/questions/1383163

Don't let all the highfalutin verbiage in this thread scare you away. The main thing that is important is using the popup dialog button to solicit additional information from the user before calling the script that will perform the final action and redirection.

If you need additional help feel free to contact me off-world using the information in my profile.