I am able to run script below in SQL (the select part of it) and it returns the results as expected; however on Mobile the line-code field is greyed out and won’t allow selections. I have confirmed that user_def1 is passed down to mobile.
This is something i’m doing in order to filter out select line codes from appearing on Mobile screen.
populateListFromQuery("non_part_usage", "line_code", "select description, line_code from line_code where npu_code = 'EXP' and line_code_type <> 'CYL' and line_code_type <> 'R'and user_def1 <> 'PR' order by sequence asc", true);
Solved
Client Script Filter on User Def field not working

Best answer by Steve Hurst
Hi
The problem is being caused because some of your line code records have NULL values in user_def1. Mobile treats these differently. In order to fix your sql query in your script you need to replace your populateListFromQuery line with the following which adds in specific handling for null values:
populateListFromQuery("non_part_usage", "line_code", "select description, line_code from line_code where npu_code = 'EXP' and line_code_type <> 'CYL' and line_code_type <> 'R' and (user_def1 <> 'PR' or user_def1 IS NULL) order by sequence asc", true);
This should then work.
Regards
Steve
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.