Solved

Custom Lookup Pre-Population with Logged In User


Userlevel 2
Badge +7

Hello All, 

Is it possible to create a Custom Lookup on an assystNET form using Contact User as the single-select-lookup but have the Default Value Expression as the user who is currently logged in?

icon

Best answer by KevinM 2 March 2023, 17:22

View original

2 replies

Userlevel 3
Badge +8

Hi Chris, 

If you are hiding the affected user field from the end user you could use something similar to the below:

$new.affectedUser.shortCode

If you aren’t hiding the affected user field then this would update as the affected user is updated. Alternatively you can use the Reporting User field - but that isn’t populated until the ticket is submitted so couldn’t drive further lookups on your form at time of completion (eg telephone number). 

Userlevel 2
Badge +7

Hi Chris, 

If you are hiding the affected user field from the end user you could use something similar to the below:

$new.affectedUser.shortCode

If you aren’t hiding the affected user field then this would update as the affected user is updated. Alternatively you can use the Reporting User field - but that isn’t populated until the ticket is submitted so couldn’t drive further lookups on your form at time of completion (eg telephone number). 

 

Hi Kevin, 

That is so simple it is genius, we tested and it works.

Thanks for your very quick response.

Reply