File Upload Button

  • 0
  • 2
  • Question
  • Updated 2 years ago
  • Answered
I would like to create a button which will:

1) Mark status field as "Complete"
2) Add a timestamp
3) Prompt for the user to upload a file to an attachment field.

I have the first two steps completed but cannot figure how to get the Upload File popup to appear.

Here is what I have so far:

var text URLONE = URLRoot() & "db/" & Dbid()
& "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_12=" & URLEncode("Completed")
& "&_fid_99=" & ToText(Today());

$URLONE


Can anyone help me with the Upload File popup?

Thanks
Photo of Michael

Michael

  • 20 Points

Posted 2 years ago

  • 0
  • 2
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,520 Points 50k badge 2x thumb
Try this

var text URLONE = URLRoot() & "db/" & Dbid()


& "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_12=" & URLEncode("Completed")
& "&_fid_99=" & ToText(Today());

var text URLTWO = urlroot() & "db/" & Dbid() & "?a=er&rid=" & totext([record ID#]);

$URLONE


& "&rdr=" & URLEncode($URLTWO)



That should update the fields and then open up the record in edit mode.



If you want to have a mini form with just the file attachment field, you could change URLTWO to 



var text URLTWO = urlroot() & "db/" & Dbid() & "?a=er&dfid=10&rid=" & totext([record ID#]);






where would be replaced by the 10 is the alternate form ID#.
Photo of Michael

Michael

  • 20 Points
Thanks again. I wound up using the mini form suggestion and that works well.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,520 Points 50k badge 2x thumb
Great, thx for letting me know