Forum Discussion
This is the error:
my logic on using the same field could be wrong because I am new to these buttons! What I thought was happening in the formula is im editing the current form i am on, then i go to the inventory tracking table from the maintenance report table, and in order to get to the correct record i need to use the reference field from the child table (maintenance report table). Meaning the inventory tracking table has many maintenance reports, the reference field in maintenance reports is "Related Asset-Mission". Then in order to get back to the maintenance table, from the inventory tracking table I have to give that reference field again? I guess that doesn't seem right now that I write it out. Would i use the key field from the table im leaving? Sorry I am a bit confused about how the formula gets to each page and how it uses the record id and how you know which record id to use.
------------------------------
Bailey Desormeaux
------------------------------
Ok, i just realized the second part is working but i had the action as 1 not 0, i wanted the box to be unchecked. So the final part that is not working is simply getting back to the default report of the maintenance report table.
------------------------------
Bailey Desormeaux
------------------------------
- MarkShnier__You2 years ago
Qrew Legend
Can you post your current formula. I gather then you want the last redirect to go to the table home page for the Maintenance Table.
so ...
var text URLTHREE = URLRoot() & "db/" & [_DBID_MAINTENANCE_REPORT] & "?a=td";
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- BaileyDesormeau2 years agoQrew Member
Final formula below, i simply copied and pasted the web address for the maintenance reports default table report because i did not know the command to do so. is this an ok solution? Or should i replace it with the command you put.
var text URLONE = URLRoot() & "db/" & Dbid()& "?act=API_EditRecord&rid=" & [Record ID#] & "&_fid_59=" & URLEncode("Complete");
var text URLTWO = URLRoot() & "db/" & [_DBID_INVENTORY_TRACKING] & "?act=API_EditRecord&rid=" & [Related Asset-mission] & "&_fid_163=0";
var text URLTHREE = "https://example.quickbase.com/db/btmqnvanr/tablereport?a=td";
$URLONE & "&rdr=" & URLEncode($URLTWO) & URLEncode("&rdr=" & URLEncode($URLTHREE))
------------------------------
Bailey Desormeaux
------------------------------- MarkShnier__You2 years ago
Qrew Legend
I suggest that you use my version. There are three reasons. One is it's more obvious that step three is to re-display the table called [_DBID_MAINTENANCE_REPORT] as "btmqnvanr" does pretty obscure as to where its going.
Also if you ever need to copy your application the buttons are all going to fail if they are hard coded to act on the previous application's tables. You might do this for some kind of testing purposes for example.
Also using the URLRoot syntax, means that that say some day down the road Realm changes because you get bought out by some giant company then the URL formula buttons will still work.
So that would be best practice you always use those indirect references to your realm name and your table names.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------