Forum Discussion
MarkShnier__You
Qrew Legend
6 years agoMy typical implementation starts with a single record ID# 1 on the single record single record on the Dashboard.
It is connected to all Users in the Users table. The purpose is simply to auto create the user if they do not exist ad in this case i land the user on the user focus record where they make their selections for their Focus. if you somehow know that you have Users created in this table then you don't need this step.
//Edit or Create a User Record for the Current User (remember to set permissions in the //User focus table)
//Set Key Field of user foicus table to userid
//User Exists - true!
//Remember to set permissions
var text AddUser = URLRoot() & "db/" & [_DBID_USER_FOCUS] & "?act=API_AddRecord"
& "&apptoken=b6rmtc2cyphwcvd4x6ur8cr3d6rd"
& "&_fid_6=" & ToText(User());
var text EditUser = URLRoot() & "db/" & [_DBID_USER_FOCUS] & "?a=er"
& "&apptoken=b6rmtc2cyphwcvd4x6ur8cr3d6rd"
& "&key=" & ToText(User());
var text DisplaySelectDateForm = URLRoot() & "db/" & [_DBID_USER_FOCUS]
& "?a=er&key=" & ToText(User())
& "&dfid=10";
var text CompareDashboard = URLRoot() & "db/" & AppID() & "?a=showpage&pageid=3";
If([# of User Focus Records for the Current User]=1, $DisplaySelectDateForm
& "&NEXTURL=" & URLEncode($CompareDashboard),
$AddUser
& "&rdr=" & URLEncode($DisplaySelectDateForm)
& URLEncode("&NextURL=" & URLEncode($CompareDashboard)))
But then the magic is that because the Key field is User, that means that i can have a relationship to any other tables using a field called [Current User] with a formula of
User()
to look up my Focus values - say Record ID# of Focus Project.
Then filter all Dashboard reports where [Record ID] of the project = Record ID# of Focus Project.
Depending on the user case one could also launch off a report of all project to set the user focus with an API to either Edit or create the Userid with that Focus and ten land the user say on a dashboard with a whole set of reports pertinent to the Focus Project.
Of course in a different use case, maybe the Focus is on a Sales Branch or a Product Category or both, to then have a whole standard set of dashboard reports filtered on some branch(es) and some Product Categories. So the sales manager might want to see everything for their own Branch, and the Product Manager may want the filter for all Branches but just their own product categories.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
It is connected to all Users in the Users table. The purpose is simply to auto create the user if they do not exist ad in this case i land the user on the user focus record where they make their selections for their Focus. if you somehow know that you have Users created in this table then you don't need this step.
//Edit or Create a User Record for the Current User (remember to set permissions in the //User focus table)
//Set Key Field of user foicus table to userid
//User Exists - true!
//Remember to set permissions
var text AddUser = URLRoot() & "db/" & [_DBID_USER_FOCUS] & "?act=API_AddRecord"
& "&apptoken=b6rmtc2cyphwcvd4x6ur8cr3d6rd"
& "&_fid_6=" & ToText(User());
var text EditUser = URLRoot() & "db/" & [_DBID_USER_FOCUS] & "?a=er"
& "&apptoken=b6rmtc2cyphwcvd4x6ur8cr3d6rd"
& "&key=" & ToText(User());
var text DisplaySelectDateForm = URLRoot() & "db/" & [_DBID_USER_FOCUS]
& "?a=er&key=" & ToText(User())
& "&dfid=10";
var text CompareDashboard = URLRoot() & "db/" & AppID() & "?a=showpage&pageid=3";
If([# of User Focus Records for the Current User]=1, $DisplaySelectDateForm
& "&NEXTURL=" & URLEncode($CompareDashboard),
$AddUser
& "&rdr=" & URLEncode($DisplaySelectDateForm)
& URLEncode("&NextURL=" & URLEncode($CompareDashboard)))
But then the magic is that because the Key field is User, that means that i can have a relationship to any other tables using a field called [Current User] with a formula of
User()
to look up my Focus values - say Record ID# of Focus Project.
Then filter all Dashboard reports where [Record ID] of the project = Record ID# of Focus Project.
Depending on the user case one could also launch off a report of all project to set the user focus with an API to either Edit or create the Userid with that Focus and ten land the user say on a dashboard with a whole set of reports pertinent to the Focus Project.
Of course in a different use case, maybe the Focus is on a Sales Branch or a Product Category or both, to then have a whole standard set of dashboard reports filtered on some branch(es) and some Product Categories. So the sales manager might want to see everything for their own Branch, and the Product Manager may want the filter for all Branches but just their own product categories.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
AdamKeever1
6 years agoQrew Commander
Thanks for sharing.
------------------------------
Adam Keever
------------------------------
------------------------------
Adam Keever
------------------------------