Auto fill the User ID in a new record

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
trevorm
Veteran Member
Posts: 35
Joined: 2014-07-29 08:41

Auto fill the User ID in a new record

Post by trevorm » 2022-10-18 14:27

I have had a little success with my requirement by using a Lookup Field and checking the "Inherit Access Permission" box but as you might expect, this gives me a drop down with a single record of the logged in users ID. Nearly there but not quite. I would like the ID to be automatically inserted in the field to negate the user's need to click on it to record it.

Preferably this should be in the backgound as the user does not need to know this is happening.

The storage of the users ID is to allow the logged in user to see only their records at a later date.

My problem is I have very limited SQL knowledge and usually get by using YouTube etc, etc, to get ideas and snippets. Even though AppGini is a magnificent programming tool, I fear I need to know SQL to get the full benefit. I am hoping I have missed the answer in my search of the various HELP options in AppGini as I hoped my requirment would be a frequent need in Database design and programming.

I would relly appreciate a bit of help here if any can offer some, thank you.

peebee
AppGini Super Hero
AppGini Super Hero
Posts: 352
Joined: 2013-03-21 04:37

Re: Auto fill the User ID in a new record

Post by peebee » 2022-10-18 21:38

I think you may need to familiarise yourself with the "Default" => "Auto" function built into Appgini? It should do exactly what you're after without any additional coding/syntax required. You can select from a number of default "User" and date/time defaults. Just make sure you set the field to "read only" if you select an "Auto" option.
default-screenshot.jpg
default-screenshot.jpg (85.71 KiB) Viewed 943 times
More about it here: https://bigprof.com/appgini/tips-and-tu ... -in-fields

trevorm
Veteran Member
Posts: 35
Joined: 2014-07-29 08:41

Re: Auto fill the User ID in a new record

Post by trevorm » 2022-10-18 23:26

Thank you, much appreciated - I will investgate

Post Reply