Forum Discussion
DonLarson
6 years agoQrew Elite
Chris,
Here is an example that works the way Austin laid out
This will add a new record using Form Ten. It also fills in field 8 with the Record ID # from where you started.
Change Dbid() to a table alias to pick a different table to be adding the record using Form Ten from that table.
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------
Here is an example that works the way Austin laid out
var text URLGenAdd =
URLRoot() & "db/" & Dbid() &
"?a=API_GenAddRecordForm&_fid_8=" & URLEncode ([Record ID#])&
"&dfid=10" &
"&z=" & Rurl();
This will add a new record using Form Ten. It also fills in field 8 with the Record ID # from where you started.
Change Dbid() to a table alias to pick a different table to be adding the record using Form Ten from that table.
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------
ChrisSwirtz2
6 years agoQrew Cadet
So this is the code I end up with:
var text URLGenAdd=URLRoot() & "db/" & [_DBID_PERIPHERALS] & "?a=API_GenAddRecordForm&_fid_15" & URLEncode ([Record ID#])&"&dfid=11" & "&z=" & Rurl();
But it puts a little yellow mark at the end and gives me an error. What am I doing wrong?
------------------------------
Chris Swirtz
------------------------------
var text URLGenAdd=URLRoot() & "db/" & [_DBID_PERIPHERALS] & "?a=API_GenAddRecordForm&_fid_15" & URLEncode ([Record ID#])&"&dfid=11" & "&z=" & Rurl();
But it puts a little yellow mark at the end and gives me an error. What am I doing wrong?
------------------------------
Chris Swirtz
------------------------------
- ChrisSwirtz26 years agoQrew CadetIt accepted the code before when I originally forgot to add the "var text URLGenAdd =" part of the formula but when I clicked the button it still just took me to the add new record utilizing the main form, not form 11 like I want it to.
When I hover the cursor over the yellow section a note pops up saying "Expecting Test"
------------------------------
Chris Swirtz
------------------------------ - DonLarson6 years agoQrew EliteChris,
What is the whole set of code you put into the Formula Rich Text box. Your GenAdd looks good, I am suspicious you have an error in the UI portion.
------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------- ChrisSwirtz26 years agoQrew CadetOh, that might be the problem, I am using a URL Formula type field, not a Rich Text Formula field. The formula I pasted above is exactly what I have in there now.
------------------------------
Chris Swirtz
------------------------------- ChrisSwirtz26 years agoQrew CadetI just tried the same formula in a Rich Text Formula field and it's giving me the same error
var text URLGenAdd=URLRoot() & "db/" & [_DBID_PERIPHERALS] & "?a=API_GenAddRecordForm&_fid_15" & URLEncode ([Record ID#])&"&dfid=11" & "&z=" & Rurl();
------------------------------
Chris Swirtz
------------------------------