How do I set up a form so a user can input just their employee # (without a dropdown field) hit enter/save and have their address and manager information pop up for them?

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered

I am creating an expense report app and have the following tables: employee, entry form, travel expenses, mileage expenses, other expenses, documents. When an employee needs to create a new expense report, I want them to be able to enter in their employee #, then hit enter/save so their address/manager information will automatically pop up. From there, they can start adding expenses for reimbursement.

I have the 'add new expense report' form created in the Entry Form table, but can't figure out how to get the 'enter employee#' field to cross reference back to the employee# field in the Employee table so it pulls up the respective information.I really don't want to use a dropdown lookup field as it would be quite long with all the employees we have.

Photo of Amy

Amy

  • 130 Points 100 badge 2x thumb

Posted 2 years ago

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

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
No problem.

You will need to ensure that the key field if your employees table is the employee number.

On the expense record, make a field called [Enter Employee #] which is just a data entry field of the same type ( probably numeric)  as the employee number.

On the existing relationship which currently has that drop down list, change the Field which might be called [Related Employee] to be. Formula field equal to the [Enter Employee#].

That should do what you want.
Photo of Amy

Amy

  • 130 Points 100 badge 2x thumb
When I change the [Related Employee] field to a formula-numeric field, I lose the relationship link back to the employee table so it can't reference any of the information to pull into the form. Maybe I'm doing something wrong?
Photo of Amy

Amy

  • 130 Points 100 badge 2x thumb
I created the [Enter Employee#] field in the Entry Form table. The [Related Employee] field is in that same table. Your formula field creation noted in your answer works, but only populates that field and doesn't pull in the information from the Employees table.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
Did you change it to be a formula field equal to the input field?

Also, and I'm really sorry if I messed you up but I forgot to ask if the app is under development or fit already had a bunch of data in it.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
Also, you will need to tab out of the field so QuickBase will recalculate the form
Photo of Amy

Amy

  • 130 Points 100 badge 2x thumb
It's a new app so has no real data yet. All is good! Yes, I changed it to a formula field to equal the input field. That part works. But again, by changing it to a formula field it's no longer linked back to the employee table so I don't know how it can pull in the address and other data from another table. What am I missing? The 'enter employee #' field and the 'related employee' field are both in the same table - the entry form table (not the employee table).
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
What is the formula in the formula field?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
Sorry, I see that you answered that.  What is the field which is the reference field to the employee table?  Is it that formula field?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
You still need the relationship.  The right side of the relationship should be that formula field.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
Contact me directly via the info in my profile if you are still stuck.
Photo of Amy

Amy

  • 130 Points 100 badge 2x thumb
It took me a little bit of redoing the relationship but I got it to work. Thank you!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
:)  Thx for letting me know.