Autofill IDfk

Discussion created by lourensjoubert on Mar 26, 2018
Latest reply on Mar 26, 2018 by lourensjoubert



I hope there’re some Gurus with a moment to spare to share their expertise — I’ve been going around in circles for a week. I suspect I’m at that stage of learning where I know just enough to dangerous (to my own sanity).



Part of a workflow solution I am working on, has three tables (only fields pertinent to my question are being shown):

Screen Shot 2018-03-26 at 18.16.30.png

You may also need to know that:

  • Primary keys in all three tables are UUIDs.
  • All tables have four auto-enter fields:
    • Created/Modified TimeStamps and
    • CreatedBy/ModifiedBy (AccountName)
  • Talent is the person doing work and recording time worked on a specific job.
  • The TalentAccountName field in the Talent table is populated manually at the time the user’s Account Name is created in Manage>Security. We’re a small team, so this is not an onerous admin job.


The relationships work as they should. That is, users can create new TimeSlip records in a dedicated layout and select her/her own name via a dynamic value list. Ditto for selecting a job. There are TimeSlip portals on both the Talent and Job layouts.


Brick wall

I’d like to spare the user a click when he/she creates a new record In the TimeSlip layout, by auto-entering the IDfkTalent key on the TimeSlip.


I think my solution lies in relating the Timeslip table’s CreatedBy (AccountName) field with the Talent table’s TalentAccountName field (which is why I created this field) and then somehow getting the IDPKTalent into the IDfkTalent field.


This sounds so complicated when I explain what I want to achieve, that I’m wondering if I’m on the right track at all.


Any pointers on how to achieve this? Or am I going about this altogether the wrong way? Is there a smarter approach to using the User's Account Name?



I’m a novice — working on my second solution only.



THANK YOU to the many people who are so generous with their advice and ideas on this forum. I’ve found lots of help on the forum (browsing only)