Forum Discussion
Here would be the proper syntax it seems of what you're trying to do:
var text urlOne = URLRoot() & "db/btan5p92a?a=API_EditRecordForm&_fid_261=" & [Project ID];
var text urlTwo = URLEncode(URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Project ID] & "&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()));
$urlOne & $urlTwo
But it also seems like you still have a little work to do if you're trying to redirect. The actual button above is actually trying to do an API Edit Record call in both apps - but neither is actually doing that properly. If thats the case, you'll need to provide more _fid_ parameters for what info you're actually attempting to change.
If your goal is just a redirect to a different app with the same record id # - then the syntax you should use is:
URLRoot() & "db/" & "btan5p92a?a=er&rid=" & [Project ID]
------------------------------
Chayce Duncan
------------------------------
When I use that last formula, I get an error that the record can't be found but I know it is there.
The records id #'s are different from table to table but the Project ID #'s are the same and are the key's in both apps. is there anything additional that would need to be written into it?
------------------------------
Sarah Driscoll
------------------------------
- ChayceDuncan2 years agoQrew Captain
Yep - if Project ID is the key then you can use the same formula but instead do:
URLRoot() & "db/" & "btan5p92a?a=er&key=" & [Project ID]
In this case you're swapping out rid with key
------------------------------
Chayce Duncan
------------------------------- SarahDriscoll12 years agoQrew Trainee
Wow...way easier of a formula than I was trying!
Thank you so much! It is working perfectly :)
------------------------------
Sarah Driscoll
------------------------------- ChayceDuncan2 years agoQrew Captain
No problem!
For context and to expand on my first response, your original formula was attempting to do API_EditRecord calls which would mean you would actually be changing something in both records. Form navigation as of now is er (edit record) and dr (display record) and so your syntax is db/dbid?a= and then er or dr.
You would pivot over to the API_EditRecord if you wanted someone to click a button and actually change something like checking a box or providing a date with a button click.
------------------------------
Chayce Duncan
------------------------------