automatic user assignment

  • 1
  • 2
  • Question
  • Updated 1 year ago
  • Answered
We need to make automatic user assignment when the form is opened (not after the form is saved).
Say, if user A is logged into the app., and opens the form, the form should automatically assign the value 'User X' in the 'Assigned To' field. 

Any help appreciated.
Thanks.
Photo of QuickbaseUser

QuickbaseUser

  • 474 Points 250 badge 2x thumb
  • unsure

Posted 2 years ago

  • 1
  • 2
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
If the "Assigned To" field is a user field, you can make the default value of the field properties be 'current user'.  

If it is a relationship, you may need to use a combination of formulaic relationships, and form rules to fill in the correct value.

Do you have more details?
Photo of QuickbaseUser

QuickbaseUser

  • 474 Points 250 badge 2x thumb
Thanks Neil!

The current functionality is : User logs into Quickbase , opens up a form and assigns the record to a user in the 'Assigned To' field.
Now, when requests comes in from specific users, the functionality should be that the 'Assigned To' field automatically has the value 'User X'.
Can it done without saving the form? 
Photo of QuickbaseUser

QuickbaseUser

  • 474 Points 250 badge 2x thumb
Let me put it this way.

In the form rules, when a record is opened, can fields be assigned a specific value?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 50,850 Points 50k badge 2x thumb
Yes it can.  But we need to know the field type that you need automated.  If the field type is a user field which is a data entry field and not a lookup field, then it can be set to default to the current user.

There are also form rules which can be used.

I think that we need ot know more about the field(s) you are looking to populate in terms of their field types and if they are lookup fields.
Photo of QuickbaseUser

QuickbaseUser

  • 474 Points 250 badge 2x thumb
If 'Record Owner' is one of the users in 'PIM Users' ('Text - multiple choice' field); then the 'Assigned To' field ('user' field) has to be assigned to a specific user.
Can this be done in a form rule before saving the form?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 50,850 Points 50k badge 2x thumb
That may be possible.

My suggestion is to first get a formula checkbox field working to evaluate of that condition is true.

Now, the field [Record Owner] is a User field and also I do not believe that it exists until the record exists, which it does not do until the record is saved.

But the Record Owner will be the current user when the record is saved.
That drop down list of PIM users seems to be just a multiple choice text field.

I suggest that you make a List User field with a formula of the userids of these PIM users.  You could call it [Userids of PIM Users]. 

 for example

ToUserList("fred.flintstone@bedrock.com",Barney.rubble@bedrock.com")

Then have a formula checkbox field called [Current User is a PIM User].

The formula would be

if(Includes([Userids of PIM Users],ToUserList(User())),true, false)

Once you have that working and tested, then put that field on the form to ensure that the form rules see it (we can hide it later once its working)

Then have a form rule like

when
[Assigned to] is (leave blank)
 and
[Current User is a PIM User] is checked

Action
Change [Assigned to] to the value Wilma.flintstone@bedrock.com
Photo of QuickbaseUser

QuickbaseUser

  • 474 Points 250 badge 2x thumb
Awesome ! Thanks Mark.....tried it and works.
(Edited)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 50,850 Points 50k badge 2x thumb
Fantastic, thx for letting me know.
Photo of neosage99x

neosage99x

  • 80 Points 75 badge 2x thumb
Hi Mark,

I am trying to use your method to trigger the form rule with no success.  Basically I need the form to read the current user (I used a formula - user field and set it to User(), and if that current user is a particular person then I want to change an existing region field to their region.  I can do this by making the users select themselves and then trigger the region to change based on that but I'm really trying to get the region field to populate correctly automatically based on current user. Please help...seems so easy but it is driving me mad :)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 50,850 Points 50k badge 2x thumb
i suggest posting this as a new Question and I will watch for it there.