Load Current User into a field on the form load

Hi!

I tried to create the following form action to set a field with the current user , but it didn't work:



there is an old AppScript in the project being used to set the user for such cases, but honestly, I don't think we need an AppScipt to do that and I believe in the low code options that we have in the SBM.

Thanks!

.

Parents
  • Verified Answer

    +1  

    I would think that form action should  work unless there might be an issue with a searchable user field or the user not available in the list.  Is the user selectable in the field without the form action?

    There is a couple of ways without an appscript. You could set the default in Web Admin for the transition:

    If it is a searchable field, you could maybe make non-searchable (if possible) or you could select to create a form action "Execute Javascript" and do the following, as it forces the search on the field:


    SetFieldValue("Data Entry Specialist", \{'id':{_UserId}, 'name':'{_UserName}')

Reply
  • Verified Answer

    +1  

    I would think that form action should  work unless there might be an issue with a searchable user field or the user not available in the list.  Is the user selectable in the field without the form action?

    There is a couple of ways without an appscript. You could set the default in Web Admin for the transition:

    If it is a searchable field, you could maybe make non-searchable (if possible) or you could select to create a form action "Execute Javascript" and do the following, as it forces the search on the field:


    SetFieldValue("Data Entry Specialist", \{'id':{_UserId}, 'name':'{_UserName}')

Children