Look up record in table associated to current user

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • In Progress
Overview: User clicks on formula url button that updates 5 fields in the record (to trigger certain automations or actions)

One of the fields needs to be updated with the value from a numeric field from the corresponding user's employee record so that the value can be used in an automation. 

I've figured out how to save the current user in the update, but I can't figure out how to look up a value in a table that's related to the current user, not the current record/table. 

I've thought of a few options, but I'm stuck on how to implement them so I'm hoping someone can help me out with a solution.

Photo of Wendy Shoef

Wendy Shoef

  • 660 Points 500 badge 2x thumb
  • confused

Posted 2 months ago

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

QuickBaseCoach App Dev./Training, Champion

  • 67,348 Points 50k badge 2x thumb
No problem

If the employee are all users, you can set the Key field of the EE table to be the userid and then make a relationship to the details table using a reference field on the right side of the relationship of the field I like to call [Current User] with a formula user formula of

User()

If not all employee have userid’s or for other reason you are unwilling to change the key field, then you can make a Sync table of selected fields from the EE table and set the Userid in text format ( it will sync across as text) to be the key field. Only bring across EEs with a userid.

Then make a reference field with theformula

ToText(User())

To make the relationship.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,348 Points 50k badge 2x thumb
Right, hence the suggestion to only Sync across EEs who did have a userid.  There is a filter when you build the Sync Connected table.

As for building the Connection, if the employee data is in a different app, you will need to make a new Quick Base Connection to get at that other App.  Note that these Connections are owned by a user, so its best practice to have them owned by a userid which is like an Admin userid that is not actually a person, but rather a userid owned by the IT department.
Photo of Wendy Shoef

Wendy Shoef

  • 660 Points 500 badge 2x thumb
Hmmm.... I think I'm going to have to do an overall on a lot of things. 
Photo of Wendy Shoef

Wendy Shoef

  • 660 Points 500 badge 2x thumb
They employee data is in the same app. The only options for the synced data was in App 1 (I'm working in App 10). 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,348 Points 50k badge 2x thumb
Then you will need to create a new Connection.  Each Connection in Quick Base only connects to a single app.
Photo of Wendy Shoef

Wendy Shoef

  • 660 Points 500 badge 2x thumb
Ah, I see.