Skip to main content
Question

How to modify two fields with a single FORMULA URL?

  • November 28, 2018
  • 0 replies
  • 29 views

Forum|alt.badge.img+6
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?  

This topic has been closed for replies.

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.


Forum|alt.badge.img+6
  • Author
  • Registered
  • November 28, 2018
Excellent, thanks