Forum Discussion
MichaelTamoush
6 years agoQrew Captain
Thanks Mark. I'm not sure I understand what field ID's I use in the three fid spots in your programming, nor what the [Request Title] field represents?
------------------------------
Mike Tamoush
------------------------------
------------------------------
Mike Tamoush
------------------------------
MarkShnier__You
Qrew Legend
6 years agoI had just grabbed an actual working example from one of my apps and I was also populating some extra fields.
You can just do this if there are no extra fields to populate other that populating the field for Related Parent.
var text ADD = URLRoot() & "db/xxxxxxxx?a=API_GenAddRecordForm&_fid_69=" & URLEncode ([Record ID#]);
var text DisplayParent = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" &[Record ID#];
$ADD
& "&NextURL=" & URLEncode($DisplayParent)
In the example above, field ID 69 was the field for [Related Parent] on the child record.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
markshnier2@gmail.com
------------------------------
You can just do this if there are no extra fields to populate other that populating the field for Related Parent.
var text ADD = URLRoot() & "db/xxxxxxxx?a=API_GenAddRecordForm&_fid_69=" & URLEncode ([Record ID#]);
var text DisplayParent = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" &[Record ID#];
$ADD
& "&NextURL=" & URLEncode($DisplayParent)
In the example above, field ID 69 was the field for [Related Parent] on the child record.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
markshnier2@gmail.com
------------------------------
- MichaelTamoush6 years agoQrew CaptainThanks!! I'm getting an error if I save or cancel, saying that the project not found. The redirect isn't working and I'm not sure why?
My code and error below. Please note my Primary key field is not record id, but project id
var text ADD = URLRoot() & "db/bpz68jg3u?a=API_GenAddRecordForm&_fid_59=" & URLEncode ([Project ID]);
var text DisplayParent = URLRoot() & "db/" & Dbid() & "?a=dr&rid=" &[Project ID];
$ADD
& "&NextURL=" & URLEncode($DisplayParent)
------------------------------
Mike Tamoush
------------------------------- MarkShnier__You6 years ago
Qrew Legend
for this code here
&rid=" &[Project ID];
either you need to use rid and then populate it with the [Record ID#] field
or else use
&key=" & [Project ID];
if the Key field is not the Record ID# field. Did you select a different field to be the Key field?
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
markshnier2@gmail.com
------------------------------- MichaelTamoush6 years agoQrew CaptainYes, I changed the key field. I see, rid is record id.... ;)
IT WORKED. Thank you!!! you are a lifesaver!!!
------------------------------
Mike Tamoush
------------------------------