This would be a situation where I would use the arfPerl plugin (but that is just me) as a simple split would take care of this.
In pure ARS you could do it in a single filter that is called multiple times (in a Guide using goto label). While the number of entries may be dynamic the actual length of an incident ID is always the same. In pseudo code it would be something like this: Filter Run-If temp_Inbound_String != $NULL$ Action 1 Field_10 = Field_9 Action 2 Field_9 = Field_8 Action 3 Field_8 = Field_7 Action 4 Field_7 = Field_6 Action 5 Field_6 = Field_5 Action 6 Field_5 = Field_4 Action 7 Field_4 = Field_3 Action 8 Field_3 = Field_2 Action 9 Field_2 = Field_1 Action 10 Field_1 = LEFT( $temp_Inbound_String$, 9) Action 11 temp_Inbound_String = LTRIM(RTRIM(SUBSTR($temp_Inbound_String$+" ", 10))) Action 12 goto start of guide label The Filter Guide would be a start label and the filter to do the split. Fred -----Original Message----- From: Action Request System discussion list(ARSList) [mailto:[email protected]] On Behalf Of Longwing, Lj Sent: Thursday, May 02, 2013 8:12 AM To: [email protected] Subject: Re: Extracting substring from string and putting the value in different field ** Sanjay, you are going to need something in the range of 11 filters...one of them that does a STRSTR to find the location of the , then one filter for each of the field1-10. Put them in a filter guide. Fire the filter that finds the , then, if that int is > 0 use SUBSTR to grab the first value, storing it in field 1 and removing that value from your temp field, then call your find the , filter, rinse and repeat untill no , is found. If no , is found, exit the guide. -----Original Message----- On Thu, May 2, 2013 at 7:06 AM, kanhu mohapatra wrote: ** Hello Pierson, Thanks for your post.But how do I get the start and end position of the incident as the string is dynamic and start and end position cannot be hard coded. See below. I have just outlined the requirement. The string which contain incident has dynamic values and maximum contains 10 ids.Where I have to count the no. incidents and then put individual incident to different field. Example : Temp_field = string string ="INC000123, INC000456, INC000789, INC000005" or "INC000123, INC000456, INC000789, INC000005,"INC000121, INC000453, INC000781, INC000002" field1="INC000123" . . . Field4="INC000121" Field5="NULL" . . Field10="NULL" or field1="INC000123" . . Field8="INC000002" Field9="NULL' Field10="NULL" what I have to do is to count no. of ids and then put individual ids to fields. The value of sting cannot be hard coded. it is always dynamic but the limit is 10 records. Basically what I want to do is to parse the string and extract the sub-string whenever it find the delimiter "," and then put the values to fields. Hope you have understood my requirement.And expect more suggestion from Lister's. Again,thanking in advance for all suggestion and help. Regards, Sanjay -----Original Message----- On Thu, May 2, 2013 at 6:11 PM, Pierson, Shawn wrote: So you will always have four Incidents that you have to parse to pass to four specific fields? If so, you can do four different Set Fields on the same AL/Filter with different SUBSTRING values pulling each Incident out based on the start and stop values of the SUBSTRING function on the TMP_field. If it's a one to many type of list, then I wouldn't do that, nor would I write them to hardcoded fields. In that case it gets more complicated, but it's still easily doable. Thanks, Shawn Pierson Remedy Developer | Energy Transfer -----Original Message----- From: Action Request System discussion list(ARSList) [mailto:[email protected]] On Behalf Of sanjay Sent: Thursday, May 02, 2013 7:35 AM To: [email protected] Subject: Extracting substring from string and putting the value in different field Hello Lister's, We have a requirement. Where we have a string which contains incident id's separated by ",". And my requirement is to extract the individual incident from the string and put the value to separate field. Example of the above requirement ========================== Input ====== TMP_field ="INC000123, INC000456, INC000789, INC000005" Output ======= Felid1 = INC000123 Felid2 = INC000456 Felid3 = INC000789 Felid4 = INC000005 and my question is how do I accomplish the above task. Please help me out to accomplish the above requirement. Many thanks for all your suggestion and help in advance. Regards, Sanjay. -- View this message in context: http://ars-action-request-system.1093659.n2.nabble.com/Extracting-substring-from-string-and-putting-the-value-in-different-field-tp7588518.html Sent from the ARS (Action Request System) mailing list archive at Nabble.com. _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org "Where the Answers Are, and have been for 20 years" Private and confidential as detailed here: http://www.energytransfer.com/mail_disclaimer.aspx . If you cannot access the link, please e-mail sender. _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org "Where the Answers Are, and have been for 20 years" _ARSlist: "Where the Answers Are" and have been for 20 years_ _ARSlist: "Where the Answers Are" and have been for 20 years_ _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org "Where the Answers Are, and have been for 20 years"

