Viewing Numbers only from a paragraph

Afternoon,

I have a rich text field that users will be typing in words and numbers and possibly linking items. I need to be able to display only the number items in a view.

I have a text field with the following formula which displays everything excepts links, pictures, etc… so that I can display that in a view:

@Abstract( [TextOnly]; 1000; “”; “Summary_1” )

What I need now is to be able to pick out any numbers from the field and display only those.

Numbers can be anywhere in the field.

There does not have to be numbers in the field.

Numbers are not always the same length.

Example of Field data:

Modify the screen art work on existing 710 rear panels to replace 910 wording…

What I need to have displayed in view:

710, 910

Can this be done? If so how?

Thanks for any and all help.

Teri

Subject: Viewing Numbers only from a paragraph

Here’s something to get you going… it loops through the data contained in your summary field (I’ve called it ‘SummaryField’ but you’ll need to change it to match your field name.

The formula loops through & parses the summary field looking for words that begin with numeric values and finishes by returning the list of numbers:

FieldData:=SummaryField;

NumberList:=“”;

FoundNumber:=“”;

@While(

@Trim(FieldData) != "";

	@If(

		@Contains("0123456789"; @Left(FieldData; 1));

			@Do(

				@If(

					@Contains(FieldData; " ");

						@Set("FoundNumber"; @Left(FieldData; " "));

					@Set("FoundNumber"; FieldData)

				);

				@Set("NumberList"; NumberList : FoundNumber)

			);

		""

	);

	@Set("FieldData"; @Right(FieldData; " "))

);

@Implode(@Trim(NumberList); ", ")

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Hope it helps.

Alex

Subject: RE: Viewing Numbers only from a paragraph

Worked great, thanks much Alex!!!

Teri