How to modify two fields with a single FORMULA URL?

  • 38
  • 1
  • Question
  • Updated 2 weeks ago
  • Answered
I have two fields, Status (FID=16), and Comments (FID=44).  

I have an existing button which inserts today's date into Comments, along with some text:

var text MyDate =Left(ToText(Today()),2) & "/" & Mid(ToText(Today()),4,2) & "/" & Right(ToText(Today()),2);
var text NewText =$MyDate & " CFE with report.\n" &  [Eval.Comments];

var text URLONE = URLRoot() & "db/" & Dbid() 
& "?act=API_EditRecord&rid=" & [RecordID#] 
& "&_fid_44=" & URLEncode($NewText);

var text URLTWO = URLRoot() & "db/" & Dbid()
& "?a=dr&rid=" & ToText([RecordID#]);

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


Now I want to have this script also change the value in Status to "To Be Reviewed" (that is, I don't want to create a second button for this; button overload on the form).

So assuming:

var text StatusText = "To Be Reviewed";

How do I modify URLONE to modify the Status field as well?  

Photo of ROBERT SACHS

ROBERT SACHS

  • 440 Points 250 badge 2x thumb

Posted 2 weeks ago

  • 38
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 52,786 Points 50k badge 2x thumb
var text URLONE = URLRoot() & "db/" & Dbid() 
& "?act=API_EditRecord&rid=" & [RecordID#] 
& "&_fid_44=" & URLEncode($NewText)
& "&_fid_99=" & URLEncode('ToBe Reviewed);

change 99 to the fid of the field to be updated.  There is no practical limit to the # of fields you can update, just keep listed them vertically in that same format.

Photo of ROBERT SACHS

ROBERT SACHS

  • 440 Points 250 badge 2x thumb
Excellent, thanks