Help with application token please!

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
I've been trying to understand application tokens and have made a mess. When using buttons in my app i am returned to a previous version of the app (which until i noticed was greatly confusing!). I want to get my app working again, tried generating a new token and assigning it but to no avail, i click on a button and i'm switched to the old version of the app. Not really understanding how app tokens work - clearly! Any help greatly appreciated please.
Photo of Kevin

Kevin

  • 260 Points 250 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
I think that you are confusing app tokens with hard coded URLs. Can you post an example of a button which is leading you to a different application.

What I expect is that you be created URL formula buttons which have the tables hard coded, as opposed to referring their table names.

Can you post an example and I will show you how to correct it.
Photo of Kevin

Kevin

  • 260 Points 250 badge 2x thumb
Here is the button code, what have i done wrong?

If(IsNull([Change Request ID#])=false and (IsNull([# of Approvals])=true or [# of Approvals]=0),URLRoot() & "db/bmgkazpqq"
& "?act=API_AddRecord"
& "&apptoken=chj8xied6ju5ucbj2guu6c6zq3c9"
//& "&apptoken=bg2ksr7cws5xgq3qgvvzbaqnghz"
& "&_fid_10="&URLEncode([Change Request ID#])
& "&_fid_8="&URLEncode("02 Submitted to PE for approval")
& "&_fid_16="&URLEncode(true)
& "&_fid_31="&URLEncode([Change Request ID#])
& "&_fid_80="&URLEncode("02 Submitted to PE for approval")
& "&rdr=" & URLEncode(URLRoot() & "db/bmgkazn4z" &  "?a=dr&rid="& [Change Request ID#] & "&dfid=2"),"")
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
So this line here
URLRoot() & "db/bmgkazpqq"

specifies the URL where the table is located at.

you will see that the table ID one of your apps is located at mycompany.quickbase.com/db/bmgkazpqq

so when you click that button on your app or a copy of your app, it will go to that table - which them maybe in the wrong app f that code came from an original app and then you are now working on a Copy of the app..

The correction is to change that to

URLRoot() & "db/" & [_DBID_CHANGE_REQUESTS]  

or whatever the "alias" table name is.  You find that in the Advanced Properties for the table, down at the bottom of the page.  
Photo of Kevin

Kevin

  • 260 Points 250 badge 2x thumb
Hi, the advice above was good and worked. I am still puzzled however?

I have copied this application numerous times without issue. Why suddenly do table references and application tokens not get carried over/updated in the process of copying the application? Surely this is not standard behaviour? Has a setting been changed somewhere?

Thanks