Solved

Contact User Lookup Filter

  • 28 October 2022
  • 4 replies
  • 156 views

Userlevel 2
Badge +7

We have a Contact User Lookup field that uses Lookup Expression as below:

select usr.id from usr as usr where usr.csg.shortCode ='xxxxxxxxxx'

 

The expression returns only Active Users.

 

We need all Active and Inactive Users.

icon

Best answer by MennovH 7 November 2022, 17:42

View original

4 replies

Userlevel 3
Badge +10

Hi Manish,

 

all lookup filters have a hard coded setting to only show active records as a default. In assystWeb the user would have an option to also include discontinued records but this is not available in assystNet.

 

 

Hi, In our case we have a lookup expression same as “ select usr.id from usr as usr where usr.csg.shortCode ='xxxxxxxxxx' “ but when number of fields increase in the form the search fails on AssystNet with error Lookup Failed. any clues or suggestions ? thanks 

Userlevel 3
Badge +10

Hi, most likely just a typo in your example, but when setting the lookup filter you always need to ‘alias’ the table you are selecting from.

In this case try select User.usr_id from usr as User where User.csg.shortCode = ‘xxxxx’

 

Thanks for the quick response, I tried the query as given but not worked same error “ Lookup search failed “ 

If I remove few fields from the form it works, some how when adding new fields the expression to able to process.

Anything to be done on Default Value Expression ? 

Thanks

Reply