JessicaErvin
7 years agoQrew Member
Is there a way to edit a record and add a record to another table with the same button?
Hello! I have currently have a button that adds a record to another table with a shared parent record. Is there a way I can have this button also edit the original child record?
to clarify, I am working with three tables, the parent table, and two children tables. I have a button to "convert" a record from one type of child record to the second, but I want to mark the original record with the date it was "converted"
Here is what I have so far, it creates the new record, but does not edit the original.
var text AddRecordOne =
URLRoot() & "db/" & "dbidforchild2"
& "?act=API_GenAddRecordForm&_fid_15=" & URLEncode ([Related Site])
& "&_fid_12=" & URLEncode([Notes])
& "&_fid_8=" & URLEncode([Forecast Complete])
& "&apptoken=******************";
var text EditTask= //mark task as completed
URLRoot() & "db/" & "dbidforchild1"
& "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_8=" & URLEncode(Today())
& "&apptoken=****************";
var text DisplayRecord=
URLRoot() & "db/" & Dbid()
& "?a=dr&rid=" & [Record ID#];
$AddRecordOne &
$EditTask
to clarify, I am working with three tables, the parent table, and two children tables. I have a button to "convert" a record from one type of child record to the second, but I want to mark the original record with the date it was "converted"
Here is what I have so far, it creates the new record, but does not edit the original.
var text AddRecordOne =
URLRoot() & "db/" & "dbidforchild2"
& "?act=API_GenAddRecordForm&_fid_15=" & URLEncode ([Related Site])
& "&_fid_12=" & URLEncode([Notes])
& "&_fid_8=" & URLEncode([Forecast Complete])
& "&apptoken=******************";
var text EditTask= //mark task as completed
URLRoot() & "db/" & "dbidforchild1"
& "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_8=" & URLEncode(Today())
& "&apptoken=****************";
var text DisplayRecord=
URLRoot() & "db/" & Dbid()
& "?a=dr&rid=" & [Record ID#];
$AddRecordOne &
$EditTask