(name of it as string as lowercase contains requirment

I need to be able to add name of it as string as lowercase in the below line from the relevance statement below as the services.csv file can have UDP or udp in the file that I am comparing to , so I need the tcp and udp to not be case sensitive.

if (tcp of it) then (“tcp”) else (“udp”)

the services.csv file will have a data format

BESClient.exe:52311:udp or
BESClient.exe:52311:UDP

or I may have TCP and udp

concatenation “;” of elements of (set of ((if (it does not start with “-”) then it else nothing) of ((item 4 of it & “:” & following text of last “:” of item 1 of it & “:” & item 0 of it) of ( (if (tcp of it) then (“tcp”) else (“udp”)), local address of it as string & “:” & local port of it as string, (if (exists remote address of it) then (remote address of it as string & “:” & remote port of it as string) else (":")), (if (exists tcp state of it) then (tcp state of it as string) else ("-")), (if (exists process of it and exists name of process of it) then (name of process of it) else ("-")) ) of sockets of network)) - set of (it as string) of lines of file (parent folder of client as string & “\services.csv”))

I’m not sure I fully understand what you’re attempting here, or if this will work, but how about something like:

concatenation “;” of elements of (set of ((if (it does not start with “-”) then it else nothing) of ((item 4 of it & “:” & following text of last “:” of item 1 of it & “:” & item 0 of it) of ( (if (tcp of it) then (“tcp”) else (“udp”)), local address of it as string & “:” & local port of it as string, (if (exists remote address of it) then (remote address of it as string & “:” & remote port of it as string) else (“:”)), (if (exists tcp state of it) then (tcp state of it as string) else (“-”)), (if (exists process of it and exists name of process of it) then (name of process of it) else (“-”)) ) of sockets of network)) - set of (preceding text of last “:” of it as string & “:” & (following text of last “:” of it as string as lowercase)) of lines of file (parent folder of client as string & “\services.csv”))

That said, it’s probably best to cast both sets to lowercase prior to the comparison/minus operation.

1 Like

Thanks Aram, that is exactly what I needed. I was approaching the problem incorrectly as to where to solve the problem at. Thanks for the quick response and correct way to solve. thanks again.