Forum Discussion
- QuickBaseCoachDQrew CaptainEvan,
That is very odd, because your button looks quite normal and the bit at the end with the &z=... tells QuickBase to redisplay the Parent record after saving.
Is there anything else unusual here in your setup. I can provide an alternative to that code which would probably work, but I'm not understanding what is different about your use case where the normal Add child button is not returning to the Parent.
What is happening now after you save the child? - EvanFujikawaQrew CadetI see what you mean. Yes it does return back. Sorry for the confusion, I explained my setup incorrectly. I have a parent form that has a child table inside it with a button that leads to the grandchild. Is it possible to return back to the parent form after the grandchild record has been saved? Is there also a way to indicate on the button that a grandchild record has been created after it's been saved? I need an indication to avoid saving multiple records related to the same record. Thanks so much for the help!
- QuickBaseCoachDQrew CaptainOK, now it makes sense. The magic is using "&NextURL= ....
No problem,
var text URLONE = URLRoot() & "db/" & [_DBID_ROOT_CAUSE] & "?a=API_GenAddRecordForm&_fid_17=" & URLEncode ([Record ID#]);
var text URLTWO = URLRoot() & "db/" & [_DBID_the table name of the parent] & "?a=dr&rid=" & [Related Parent];
$URLONE
& "&NextURL=" & URLEncode($URLTWO)
I am using formula variables for readability and when you link the next thing for QuickBase to do, you need to URLEncode it. Not sure why, but that's the syntax to make it work. - EvanFujikawaQrew Cadeti did update the fields and I am now receiving the error "Formula syntax error
There are extra characters beyond the end of the formula."
URLRoot() & "db/" & [_DBID_ROOT_CAUSE] & "?a=API_GenAddRecordForm&_fid_17=" & URLEncode ([Record ID#])& "&z=" & Rurl()
var text URLONE = URLRoot() & "db/" & [_DBID_ROOT_CAUSE] & "?a=API_GenAddRecordForm&_fid_17=" & URLEncode ([Record ID#]);
var text URLTWO = URLRoot() & "db/" & [_DBID_DAMAGE] & "?a=dr&rid=" & [Related Damage Parts Incidents2 - Related Incident];
$URLONE
& "&NextURL=" & URLEncode($URLTWO)
Am I missing something?
Thanks for your help! - QuickBaseCoachDQrew Captain//You just need this part. this replaces your original formula.
var text URLONE = URLRoot() & "db/" & [_DBID_ROOT_CAUSE] & "?a=API_GenAddRecordForm&_fid_17=" & URLEncode ([Record ID#]);
var text URLTWO = URLRoot() & "db/" & [_DBID_the table name of the parent] & "?a=dr&rid=" & [Related Parent];
$URLONE
& "&NextURL=" & URLEncode($URLTWO) - EvanFujikawaQrew CadetFantastic! The formula does return me back to the parent table but the only problem now is if my parent table houses multiple records in the child table, it returns me back to a different parent record every time I save a grandchild record.
Below is the child table inside the parent form leading to the grand child record button
Thank you! - QuickBaseCoachDQrew CaptainNow I am confused again as to what the problem is.
Can you describe your relationships and use the real names of the tables?. And then explain using the real names of the tables what the problem is? - EvanFujikawaQrew CadetSorry for the confusion. I have a Damage table (Parent) that has a child table (Damage Parts) embedded in the parent table. My Damage Parts table inside the parent form has a button that leads to the grand child table (Root Cause) for every row in the table.
Child table (Damage Parts) in the Parent Table (Damage) the leads to Grand Child "Add Investigation" (Root Cause)
Table Record Flow
Damage >> Damage Parts >> Root Cause
(Once record is saved in Root Cause, I want to return back to original Damage incident)
The problem is once I create a grand child record through "Add Investigation" it returns me back to the parent table (Damage) but it's returning me to the different record.
I should note, in your formula I did reference record ID in the Parent Table for [Related Parent]; is this correct?
Thanks so much for the help! - QuickBaseCoachDQrew CaptainCan you post your actual code for the button?
- EvanFujikawaQrew CadetHere is my current code...
var text URLONE = URLRoot() & "db/" & [_DBID_ROOT_CAUSE] & "?a=API_GenAddRecordForm&_fid_17=" & URLEncode ([Record ID#]);
var text URLTWO = URLRoot() & "db/" & [_DBID_DAMAGE] & "?a=dr&rid=" & [Record ID#];
$URLONE
& "&NextURL=" & URLEncode($URLTWO)