Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
khaycock
Creator
Creator

Loading in specific data from a field

I have a field where which holds a lot of text as it is a description field but I would like to only take the first few sets of numbers that are within each field. The user has inputted these sets of numbers at the beginning of the field and are split up by commas. Is there anyway to force the load of the field in the script to only bring in all numbers at the beginning of the field and nothing else?

The data looks like this:

serena.PNG

Then followed by the text.

The field name is [Vulnerability description]. Is this even possible?

25 Replies
khaycock
Creator
Creator
Author

Amazing thank you!!!

vishsaggi
Champion III
Champion III

No Problem.

khaycock
Creator
Creator
Author

If I wanted to use the Subfield statement on another field that has many different delimiters (such as ',' '.' '&' 'and' etc..), is this possible to do all in one line?  I've tried like this: Subfield([IP Address],',& .and') AS IPAddress, but didn't seem to work

vishsaggi
Champion III
Champion III

No Subfield function takes only one delimiter at a time unless the data has ,. as consecutive characters. So probably use multiple subfield() like

Subfield(Subfield(Subfield([IP Address], ',') , '.'), ')')

khaycock
Creator
Creator
Author

Hi Vishwarath, I have another similar question.

I have another field that I need to only take a specific part of it but I'm not sure if I can use the same constraints as above on it.

Here is the field:

CN=1234566,OU=Workstations,OU=Screen,OU=CALA,OU=Dog,OU=Cat,DC=txt,DC=business,DC=com

I only want the information from the second 'OU' to be displayed in my field. So in this case all I want to be displayed is 'Screen'.

Is this possible?

andrey_krylov
Specialist
Specialist

=Subfield(Subfield([Field], 'OU=', 3), ',')

vishsaggi
Champion III
Champion III

Try this?

= Subfield(Mid(Description,Index(Description,'OU=',2), Len(Description)), ',', 1)

khaycock
Creator
Creator
Author

That is still showing the OU= part, can we remove that?

vishsaggi
Champion III
Champion III

Yes, you can use any of below expr

= Subfield(Mid(Description,Index(Description,'OU=',2)+3, Len(Description)), ',', 1)

OR

= PurgeChar(Subfield(Mid(Description,Index(Description,'OU=',2), Len(Description)), ',', 1), 'OU=')

khaycock
Creator
Creator
Author

I'm sorry to keep asking you questions, but they are all similar to the same theme so saves me opening a new thread!

Regarding the comment:

'No Subfield function takes only one delimiter at a time unless the data has ,. as consecutive characters. So probably use multiple subfield() like

Subfield(Subfield(Subfield([IP Address], ',') , '.'), ')')'

I also have fields within the data that have been delimetered using a return space and putting it onto the next line. Am I able to force these within a subfield statement too?