[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

Split function in Axapta? String manupulation

Oct@ESI

12/20/2005 8:08:00 PM

Hi,
My webservice returns a tab-delimited string. I need to split them out to an
array of string. Any quick way to do this?

5 Answers

Micha³ Kupczyk

12/20/2005 8:30:00 PM

0

"Oct@ESI" >
> My webservice returns a tab-delimited string. I need to split them out to
> an
> array of string. Any quick way to do this?

container = str2con(yourString,'\t');

--
Michal
(just ask!)


Joris de Gruyter

12/21/2005 10:01:00 AM

0

There's just one problem with that... If you're using for example item
numbers with only numbers in them, the container will convert the string
"123" to an integer 123.



"Michal Kupczyk >" <Remove second underscore<michal_kupczyk_@poczta.onet.pl>
wrote in message news:eI9YrRaBGHA.1092@TK2MSFTNGP09.phx.gbl...
> "Oct@ESI" >
>> My webservice returns a tab-delimited string. I need to split them out to
>> an
>> array of string. Any quick way to do this?
>
> container = str2con(yourString,'\t');
>
> --
> Michal
> (just ask!)
>


Oct@ESI

12/21/2005 11:37:00 PM

0

Thanks....
But the way Axapta change the data type to int really bother me.
Anyway, I run into issue where Axapta thinks that space is also \t. Says I
pass the whole address like 123 N Main St (tab) Los Angeles (tab) CA, the con
will be;
123
Los
CA

Anyway to overcome this?

"Joris de Gruyter" wrote:

> There's just one problem with that... If you're using for example item
> numbers with only numbers in them, the container will convert the string
> "123" to an integer 123.
>
>
>
> "Michal Kupczyk >" <Remove second underscore<michal_kupczyk_@poczta.onet.pl>
> wrote in message news:eI9YrRaBGHA.1092@TK2MSFTNGP09.phx.gbl...
> > "Oct@ESI" >
> >> My webservice returns a tab-delimited string. I need to split them out to
> >> an
> >> array of string. Any quick way to do this?
> >
> > container = str2con(yourString,'\t');
> >
> > --
> > Michal
> > (just ask!)
> >
>
>
>

Oct@ESI

12/22/2005 12:17:00 AM

0

Nevermind, I rewrote the str2con and remove the conversion part. Perfect now.

"Oct@ESI" wrote:

> Thanks....
> But the way Axapta change the data type to int really bother me.
> Anyway, I run into issue where Axapta thinks that space is also \t. Says I
> pass the whole address like 123 N Main St (tab) Los Angeles (tab) CA, the con
> will be;
> 123
> Los
> CA
>
> Anyway to overcome this?
>
> "Joris de Gruyter" wrote:
>
> > There's just one problem with that... If you're using for example item
> > numbers with only numbers in them, the container will convert the string
> > "123" to an integer 123.
> >
> >
> >
> > "Michal Kupczyk >" <Remove second underscore<michal_kupczyk_@poczta.onet.pl>
> > wrote in message news:eI9YrRaBGHA.1092@TK2MSFTNGP09.phx.gbl...
> > > "Oct@ESI" >
> > >> My webservice returns a tab-delimited string. I need to split them out to
> > >> an
> > >> array of string. Any quick way to do this?
> > >
> > > container = str2con(yourString,'\t');
> > >
> > > --
> > > Michal
> > > (just ask!)
> > >
> >
> >
> >

Joris de Gruyter

12/22/2005 12:14:00 PM

0

Sad but, we've basically done the same thing... made our own str2con...




"Oct@ESI" <OctESI@discussions.microsoft.com> wrote in message
news:189D2860-0273-487F-8E0F-9BD228F8434F@microsoft.com...
> Nevermind, I rewrote the str2con and remove the conversion part. Perfect
> now.
>
> "Oct@ESI" wrote:
>
>> Thanks....
>> But the way Axapta change the data type to int really bother me.
>> Anyway, I run into issue where Axapta thinks that space is also \t. Says
>> I
>> pass the whole address like 123 N Main St (tab) Los Angeles (tab) CA, the
>> con
>> will be;
>> 123
>> Los
>> CA
>>
>> Anyway to overcome this?
>>
>> "Joris de Gruyter" wrote:
>>
>> > There's just one problem with that... If you're using for example item
>> > numbers with only numbers in them, the container will convert the
>> > string
>> > "123" to an integer 123.
>> >
>> >
>> >
>> > "Michal Kupczyk >" <Remove second
>> > underscore<michal_kupczyk_@poczta.onet.pl>
>> > wrote in message news:eI9YrRaBGHA.1092@TK2MSFTNGP09.phx.gbl...
>> > > "Oct@ESI" >
>> > >> My webservice returns a tab-delimited string. I need to split them
>> > >> out to
>> > >> an
>> > >> array of string. Any quick way to do this?
>> > >
>> > > container = str2con(yourString,'\t');
>> > >
>> > > --
>> > > Michal
>> > > (just ask!)
>> > >
>> >
>> >
>> >