The operator "last" is not defined

(imported topic written by rpedregon)

Hi, I am trying to find the last character in a string for the tomcat service to determine what version I am dealing with on systems, but I am getting an error saying ‘The operator “Last” is not defined’ when I run it in the QnA tool. Here is my statement:

(following text of last “tomcat” of (services whose (it as string as lowercase contains “tomcat”)))

Any help would be appreciated.

thanks!

(imported comment written by JasonHonda)

The issue you’re running into is that you’re not always operating on a string and so “last” is not something you can do with a service.

You’ll want to do something more like the following

Q: following text of last “tomcat” of display names of services whose (it as string as lowercase contains “tomcat”)

(imported comment written by rpedregon)

THAT WAS PERFECT! Thank you so much for the help!