List view filter based on index of a character
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2023 06:38 AM
Hello Community,
I have a requirement to filter the result displayed in a LIST view of a table records based on a field value that contains a particular character at a fixed place.
so for example I want to filter or display results in this column where the value has the letter 'F' at 4th place.
Is that possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2023 08:52 AM
Hi @Suryansh Verma ,
Available list search wildcards
The platform supports several wildcard characters to expand and refine search results.
Wildcard | Description |
*search-term %search-term% | Search for values that contain search-term. |
%search-term | Search for values that end with search-term. |
search-term% | Search for values that start with search-term. |
=search-term | Search for values that equal search-term. |
!*search-term | Search for values that don't contain search-term. |
!%search-term | Search for values that don't end with the search-term. |
!=search-term | Search for values that don't equal search-term. |
Reference : https://docs.servicenow.com/en-US/bundle/utah-platform-user-interface/page/use/using-lists/task/t_Se...
Regards,
Shravan.
Please mark as correct and helpful answer if this helps you
Shravan
Please mark this as helpful and correct answer, if this helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2023 09:30 AM - edited 03-08-2023 09:32 AM
Create a new string column.
Go to Advanced View.
Select the Calculated Value tab.
In the Calculation field, place:
(function calculatedFieldValue(current) {
return current.my_column.charAt(4) || "";
})(current);
Filter the list on the new column value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2023 10:45 AM
@jrmarkel Thanks for your reply.
I want to return the complete field value where I have a character "C" in 7th place, not just the character at 7th place.