Forum Discussion

HannahEngelson's avatar
HannahEngelson
Qrew Cadet
7 months ago

Pull Data from employee data table based on current user

Hello!

I want to pull employee data (name, email, work location, etc) from a connected table that gets fed from our HR system. My connected table uses the Employee ID as the key, but I could change it.

An employee goes into the app to submit a new report, they have to put in their ID number to find their info. I want the connected table to automatically populate the employee's data based on the current user, without them having to do anything. We have 1700 employees who will be using this submission process so we're a little concerned about mistakes being made and not putting in the correct ID number, therefore submitting a report for someone else.

I've tried to do this in a couple of ways, and I just can't get it to work. Ideas are very much appreciated!

6 Replies

  • Denin's avatar
    Denin
    Qrew Captain

    This is not an exact implementation plan, but an idea:

    Imagine you have an [email] field.

    Each employee logged into Quickbase has the same email as their employee info in the table with the [email] field matching.

    Then you can use something like this formula in a formula - checkbox:

    [Email] = UserToEmail(User())

    To check if the match is there. If true, then set your field XYZ to equal the other record's XYZ.

    Possibly you can use lookup fields or formulas to prepopulate the fields automatically or using form rules.

  • If everyone has user emails, then I'd recommend just making that the key field. You could also use a many-to-many relationship with another table that just connects to the employee table and has a different key field. 

  • So I made the key field of my connected table the email address. I have a current user email field and the key for the connection in the form. When I try to make a form rule to have the connected field match the user email field, nothing happens and it still makes me select using the dropdown picker, even though I made it read only. Thoughts?

    • curevick's avatar
      curevick
      Qrew Cadet

      Interesting! I'd be happy to connect on this because it could be a few different things and I'm curious. Want me to set something up? 

      • HannahEngelson's avatar
        HannahEngelson
        Qrew Cadet

        I actually found a way around it by changing the connected reference field to formula text and making it the record owner email upon save. It pulls in the right info, but the issue I have now is that if the employee for whatever reason no longer comes over in the connection, all the lookup fields go blank.

        If you'd like to take a look, I would love to set something up and get some thoughts! I can just make a copy of the app and use that for troubleshooting.