Forum Discussion

DeepaKesavalu's avatar
DeepaKesavalu
Qrew Cadet
8 years ago

automatic user assignment

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.
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    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?
  • 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? 
  • Let me put it this way.

    In the form rules, when a record is opened, can fields be assigned a specific value?
  • 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.
  • 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?
  • 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
  • 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 :)