Re: Extracting substring from string and putting the value in different field

2013-05-03 Thread kanhu mohapatra
Hello Lister's/sagar,

Thanks for your post it really a nice idea to implement. I am able
to achieve my requirement.

Thanks for all your helpful suggestion and post. .

Have a great day and nice weekend too...

Regards,
Sanjay


On Fri, May 3, 2013 at 9:05 AM, Sagar Valse wrote:

> **
> Hi,
>
> I have created 2 forms 1 display only form containing a field(desc) to
> store string "INC000123, INC000456, INC000789, INC05"
> ,a temp field(temp) and another regular form to store the incident tickets.
>
> 1.Created alink Alink1 with actions
> a.Set desc=$default$
> b.Set temp=STRSTR($desc$, ",")
> c.callguide AlinkGuide
>AlinkGuide:
>1. Label "Start"
>2. Call alink Alink2
>if 'temp' != "-1"
>  i. Push in form 2
> incno= SUBSTR($desc$, 0, $temp$ - 1)
>  ii.Set desc=SUBSTR($desc$, $temp$ + 1, LENGTH($desc$))
>  iii. Go to guide label Start.
>else
>  i.Go to guide label End.
>3. Label "End"
> d.Pushfield in form 2
>incno=desc
>
> Thanks and Regard,
> Sagar Valse
>
>
> On Thu, May 2, 2013 at 7:53 PM, jayesh panchal wrote:
>
>> **
>>
>> Have you tried using LEFTC function in set field action???.it will
>> extract substrings and u can set into different field.
>>
>> Regards
>> Jayesh
>> On May 2, 2013 6:05 PM, "sanjay"  wrote:
>>
>>> 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, INC05"
>>>
>>> Output
>>> ===
>>> Felid1 = INC000123
>>> Felid2 = INC000456
>>> Felid3 = INC000789
>>> Felid4 = INC05
>>>
>>> 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"
>>>
>> _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"


Re: Extracting substring from string and putting the value in different field

2013-05-02 Thread Sagar Valse
Hi,

I have created 2 forms 1 display only form containing a field(desc) to
store string "INC000123, INC000456, INC000789, INC05"
,a temp field(temp) and another regular form to store the incident tickets.

1.Created alink Alink1 with actions
a.Set desc=$default$
b.Set temp=STRSTR($desc$, ",")
c.callguide AlinkGuide
   AlinkGuide:
   1. Label "Start"
   2. Call alink Alink2
   if 'temp' != "-1"
 i. Push in form 2
incno= SUBSTR($desc$, 0, $temp$ - 1)
 ii.Set desc=SUBSTR($desc$, $temp$ + 1, LENGTH($desc$))
 iii. Go to guide label Start.
   else
 i.Go to guide label End.
   3. Label "End"
d.Pushfield in form 2
   incno=desc

Thanks and Regard,
Sagar Valse


On Thu, May 2, 2013 at 7:53 PM, jayesh panchal wrote:

> **
>
> Have you tried using LEFTC function in set field action???.it will extract
> substrings and u can set into different field.
>
> Regards
> Jayesh
> On May 2, 2013 6:05 PM, "sanjay"  wrote:
>
>> 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, INC05"
>>
>> Output
>> ===
>> Felid1 = INC000123
>> Felid2 = INC000456
>> Felid3 = INC000789
>> Felid4 = INC05
>>
>> 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"
>>
> _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"


Re: Extracting substring from string and putting the value in different field

2013-05-02 Thread jayesh panchal
Have you tried using LEFTC function in set field action???.it will extract
substrings and u can set into different field.

Regards
Jayesh
On May 2, 2013 6:05 PM, "sanjay"  wrote:

> 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, INC05"
>
> Output
> ===
> Felid1 = INC000123
> Felid2 = INC000456
> Felid3 = INC000789
> Felid4 = INC05
>
> 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"
>

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"


Re: Extracting substring from string and putting the value in different field

2013-05-02 Thread Grooms, Frederick W
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 1Field_10  = Field_9   
   Action 2Field_9  = Field_8   
   Action 3Field_8  = Field_7   
   Action 4Field_7  = Field_6   
   Action 5Field_6  = Field_5   
   Action 6Field_5  = Field_4   
   Action 7Field_4  = Field_3   
   Action 8Field_3  = Field_2   
   Action 9Field_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:arslist@ARSLIST.ORG] On Behalf Of Longwing, Lj
Sent: Thursday, May 02, 2013 8:12 AM
To: arslist@ARSLIST.ORG
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, INC05" or "INC000123, INC000456, 
INC000789, INC05,"INC000121, INC000453, INC000781, INC02"
field1="INC000123"
.
.
.
Field4="INC000121"
Field5="NULL"
.
.
Field10="NULL"

or 
field1="INC000123"
.
.
Field8="INC02"
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:arslist@ARSLIST.ORG] On Behalf Of sanjay
Sent: Thursday, May 02, 2013 7:35 AM
To: arslist@ARSLIST.ORG
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, INC05"

Output
===
Felid1 = INC000123
Felid2 = INC000456
Felid3 = INC000789
Felid4 = INC05

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.n

Re: Extracting substring from string and putting the value in different field

2013-05-02 Thread Longwing, Lj
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.


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, INC05" or "INC000123,
> INC000456, INC000789, INC05,"INC000121, INC000453, INC000781, INC02"
>
> field1="INC000123"
> .
> .
> .
> Field4="INC000121"
> Field5="NULL"
> .
> .
> Field10="NULL"
>
> or
> field1="INC000123"
> .
> .
> Field8="INC02"
> 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
>
>
> On Thu, May 2, 2013 at 6:11 PM, Pierson, Shawn <
> shawn.pier...@energytransfer.com> 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:
>> arslist@ARSLIST.ORG] On Behalf Of sanjay
>> Sent: Thursday, May 02, 2013 7:35 AM
>> To: arslist@ARSLIST.ORG
>> 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, INC05"
>>
>> Output
>> ===
>> Felid1 = INC000123
>> Felid2 = INC000456
>> Felid3 = INC000789
>> Felid4 = INC05
>>
>> 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_

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"


Re: Extracting substring from string and putting the value in different field

2013-05-02 Thread kanhu mohapatra
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, INC05" or "INC000123,
INC000456, INC000789, INC05,"INC000121, INC000453, INC000781, INC02"

field1="INC000123"
.
.
.
Field4="INC000121"
Field5="NULL"
.
.
Field10="NULL"

or
field1="INC000123"
.
.
Field8="INC02"
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


On Thu, May 2, 2013 at 6:11 PM, Pierson, Shawn <
shawn.pier...@energytransfer.com> 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:
> arslist@ARSLIST.ORG] On Behalf Of sanjay
> Sent: Thursday, May 02, 2013 7:35 AM
> To: arslist@ARSLIST.ORG
> 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, INC05"
>
> Output
> ===
> Felid1 = INC000123
> Felid2 = INC000456
> Felid3 = INC000789
> Felid4 = INC05
>
> 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"
>

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"


Re: Extracting substring from string and putting the value in different field

2013-05-02 Thread Pierson, Shawn
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:arslist@ARSLIST.ORG] On Behalf Of sanjay
Sent: Thursday, May 02, 2013 7:35 AM
To: arslist@ARSLIST.ORG
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, INC05"

Output
===
Felid1 = INC000123
Felid2 = INC000456
Felid3 = INC000789
Felid4 = INC05

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"


Extracting substring from string and putting the value in different field

2013-05-02 Thread sanjay
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, INC05" 

Output 
===
Felid1 = INC000123 
Felid2 = INC000456 
Felid3 = INC000789 
Felid4 = INC05 

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"