Auto fill a column with preset data on a grid edit table.

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Hi all,

I am learning quickbase, and creating few forms and tables for data collection within my company.

The user, needs grid edit table with two columns pre-filled with pre defined dataset, to enter other data relating to it. This action of pre-fill should happen based on the user name.

I have attached a image of the model. In that image, Location and Business unit field needs to be filled in automatically.





It would be really great if you could help me out on the pre filling part.

Thanks,
Photo of Ved

Ved

  • 30 Points

Posted 3 years ago

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

QuickBaseCoach App Dev./Training, Champion

  • 69,814 Points 50k badge 2x thumb
You should set up a table of users with the key field being user.  

Then simply make a relationship between the user table and the details data entry table where the reference field on the right side of the relationship is the called [Current User] with a formula of user().  Then load each user with that standard data.


Then just lookup that info down into the detail records, so no need to key that data at all.
Photo of Ved

Ved

  • 30 Points
Hi Mark,

I am bit off the track on what you have guided me to do.

It would be awesome if you please give me step by step instruction?

Thanks,
Ved
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,814 Points 50k badge 2x thumb
I did.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,814 Points 50k badge 2x thumb
I suggest that you follow the steps and post back if you get stuck, letting me where you got stuck.
Photo of Ved

Ved

  • 30 Points
i am struck from the start.

I did create a relationship, then tired your instructions. But that's where I am struck.

It would be good if these instructions are step by step.

We are are not dev in quickbase, we are learining. And I am very much happy that you are training us through these replies to our queries.

Thank you in advance for you help.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,814 Points 50k badge 2x thumb
I cannot help you unless you specifically tell me what you have done.  Please list each of my steps above and tell me which ones you did so far.
Photo of Ved

Ved

  • 30 Points
where the reference field on the right side of the relationship is the called [Current User] with a formula of user()--- This one...
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,814 Points 50k badge 2x thumb
Make a formula User field on the details table called Current User, and give it the formula. User()


The function User() will always return the userid of the current user.
Photo of Ved

Ved

  • 30 Points
Hi Mark,
That was very much useful. i did create a Formula User field called Current User. And created a relationship between two tables. Now the question is, the Formula User field only will return the current ID, how to "load the user with standard data" when its the current user id. EOD the user is not me, and some other user who has access to the table will be entering the data.

Please help me with this. I am really struck in this part.

This would be of huge help.

Thanks in advance.
Ved
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,814 Points 50k badge 2x thumb
Right, I forgot about that issue.

Try this.

Make a set of new field corresponding to the lookup fields, and set them to be snapshot fields.  http://help.quickbase.com/user-assistance/Default.html#setting_up_snapshot_fields.html

Set each of hem to freeze the value of the lookup fields.  So what should happen is the the data is entered and the system will lookup a data field from the User record.  Then that value will get frozen into a snapshot field and that is the field that you will use for your various reports and in viewing records.
Photo of Ved

Ved

  • 30 Points
Yup I did the same, Thank you very much Mark. It was awesome... thank you a ton..

ved