Skip to main content
Question

can we use table aliases in scripts files

  • September 9, 2016
  • 0 replies
  • 99 views

My application uses lots of jquery script files and the TABLE ID is hard coded everywhere.

The problem is that these IDs changes when the application is either copied or a new sandbox environment is created and the IDs have to be changed in all the scripts.

Is there a way to use the DB aliases in the script file or many be a better approach to handle this?, I tried using the DB aliases but that didn't work.

This topic has been closed for replies.

  • Quickbase Alumni
  • July 7, 2017
You should be able to use _DBID_TABLENAME but I could be wrong about that. I definitely know that gDBID is global variable for the table ID your on. Hope that helps.

  • Quickbase Alumni
  • July 7, 2017
You can't use table aliases in scripts. 

However you can determine the mapping between table aliases and dbids using the API.

Call dbid?act=API_GetSchema on the application dbid and the names and dbid's of each table will be listed within the <chdbids> tag.

See also:

How is the name of a table alias determined ?
https://community.quickbase.com/quickbase/topics/how-is-the-name-of-a-table-alias-determined

  • Quickbase Alumni
  • March 10, 2018
Oh I just posted on this.  Yes you can as long as you have the app dbid.

https://community.quickbase.com/quickbase/topics/using-table-aliases-in-the-urls