Forum Discussion
The only issue is QB is saying i am missing an app token. I am unsure of where and how to put the app token in this formula. Also, is there somewhere I can learn more in depth about these URL and Rich Text formulas? I am only learning form the discussions area of the QB community and it would really help if I could learn this more in depth. Thanks for your help!
------------------------------
Bailey Desormeaux
------------------------------
My test system doesn't require tokens so I took it out. In your editRecord call - just add this back:
(the actual token needs to be updated with your token)
API_EditRecord&apptoken=xxxxxx&rest of your code
As for your question, QB university will be the primary place for info - items like the %%rid%% unfortunately aren't really documented consistently. They live in the archives of the forum or miscellaneous articles that I've found over the years.
------------------------------
Chayce Duncan
------------------------------
- BaileyDesormeau11 months agoQrew Member
Hi Chayce,
On the following formula I am trying to make Field 153 be populated with the [Mission ID#] however when i try to do that in your formula i get a syntax error. This is what I was trying to update the formula to:
var text view = URLRoot() & "db/" & Dbid() & "?a=er&rid=";
var text url = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&apptoken=xxxxxxxxxx&rid=" & If( [Mission ID#] > 0, ToText([Mission ID#]),"%%rid%%") & "&_fid_153=" &[Mission ID#] &rdr=" & URLEncode($view) & If( [Mission ID#] > 0, ToText([Mission ID#]),"%%rid%%");
var text link = "<a href='" & $url & "' data-replaceRid='true' style='font-size: 11pt;margin-left: 5px; margin-top: 0px; height: 33px; width: 160px; text-align:center;background-color:#13294d;color:white;background-image: linear-gradient(to bottom, #13294d 0%, #13294d 100%);' class='SaveBeforeNavigating Vibrant'>Save and Continue</a>";
$linkHowever quickbase is highlighting the two percentage signs here (%%rid%%") and saying please check the syntax of your formula. Look for mismatched parentheses, missing quotes, or extra brackets. Also, if the field name contains either '\' or ']', they should be prefixed with a '\'.
------------------------------
Bailey Desormeaux
------------------------------- MarkShnier__You11 months agoQrew Legend
try this correcttion
var text url = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&apptoken=xxxxxxxxxx&rid=" & If( [Mission ID#] > 0, ToText([Mission ID#]),"%%rid%%") & "&_fid_153=" &[Mission ID#] & "&rdr=" & URLEncode($view) & If( [Mission ID#] > 0, ToText([Mission ID#]),"%%rid%%");
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- BaileyDesormeau11 months agoQrew Member
That corrected it, however it is not getting that field populated. After I save the new record and press the url formula button that has this formula:
var text LINKMISSION = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Mission ID#] & "&_fid_153=" & [Mission ID#] &"&apptoken=xxxxxxxxx";
var text TOTABLES = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & [Mission ID#];
$LINKMISSION
& "&rdr=" & URLEncode($TOTABLES)It fills the field that I want. I am wondering if it all happens too fast because the field I am asking it to fill is a field that is related to a different app.
------------------------------
Bailey Desormeaux
------------------------------