Saturday, October 13, 2018

Search for Records with Fields Values Starting with a Space Character

Some fields in NetSuite allows user enter a space character at the beginning of the value. An example is the Sales Description field of an item record. If you found a space character on field values it is more likely entered by mistake. User then tries to search for all affected records using a criteria that Starts With = <space character>. However, a space character alone is not an accepted value. This is because you when you enter a space character in a filter field it gets wiped out, making it impossible to search for fields that starts with a space character. 

User can make user of a formula as a criteria instead. In the example below 'Sales Description' field of an item record (id=salesdescription) is used to illustrate the process.


1. Navigate to Lists > Search > Saved Searches > New > Select Item

2. In the Criteria tab of an item saved search, select Formula (Text)

3. Enter this formula: case when (SUBSTR({salesdescription},1,1))=' ' then '0' else '1' END

4. Select "Is" then enter '0' (zero)

Note: Zero represents the value with a space character. Using the case when function, the search will then display all field values beginning with a space character.

 

 

No comments:

Post a Comment