Skip to main content
Question

how to pass child table value to parent table in quickbase using API formula

  • February 21, 2023
  • 0 replies
  • 106 views

I am attempting to update a status field in the parent table when a user clicks the API button from the child table. I have used the following formula, but I received an error stating 'Missing "rid" parameter.' Additionally, I would like to hide the API button from the child table when the user clicks on it

var text EditUser = URLRoot() & "db/" & [_DBID_ON_HOLD_TASKS] & "?act=API_EditRecord"
& "&rid=" & [Record ID#] & "&_fid_6=" & Now(); // Chlid table

var text AddUser = URLRoot() & "db/" & [_DBID_INPROGRESS] & "?act=API_EditRecord"
& "&apptoken=dpvtvtrbuvtrjjd5ydp38bccn9np"
& "&_fid_45=" & URLEncode("Task OnHold"); // Parent table

If(IsNull([On Hold Start Date]),
$AddUser & "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_INPROGRESS] & "?a=dr&rid=" & [Record ID#]),
$EditUser & "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_ON_HOLD_TASKS] & "?a=dr&rid=" & [Record ID#]))



------------------------------
manohar vankireddy
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24

For this line here

var text AddUser = URLRoot() & "db/" & [_DBID_INPROGRESS] & "?act=API_EditRecord"
& "&apptoken=dpvtvtrbuvtrjjd5ydp38bccn9np"
& "&_fid_45=" & URLEncode("Task OnHold"); // Parent table

you are telling it to edit a record, but you have not specified, which record to edit. So it needs a &rid= parameter, maybe like

"&rid=" & [related parent]



------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------