Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

List view filter based on index of a character

Suryansh Verma
Tera Contributor

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?

 

SuryanshVerma_0-1678286276806.png

 

3 REPLIES 3

Sai Shravan
Mega Sage

Hi @Suryansh Verma ,

 

Available list search wildcards
The platform supports several wildcard characters to expand and refine search results.

WildcardDescription

*search-term

%search-term%

Search for values that contain search-term.
%search-termSearch for values that end with search-term.
search-term%Search for values that start with search-term.
=search-termSearch for values that equal search-term.
!*search-termSearch for values that don't contain search-term.
!%search-termSearch for values that don't end with the search-term.
!=search-termSearch 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

Regards,
Shravan
Please mark this as helpful and correct answer, if this helps you

jrmarkel
Giga Sage

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.

 

 

@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.