NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: johanco123 on August 01, 2014, 04:24:15 AM

Title: How do I get the first character in gsv?
Post by: johanco123 on August 01, 2014, 04:24:15 AM
Hi Bruce

How can I get the first character of a value in a field

say the value is 'Payment' and I just want the 'P'
like in windows it work as   sp:description[1]

I want the same result in p_web.gsv('sp:description') to display the 'P'

Kind regards
Johan
Title: Re: How do I get the first character in gsv?
Post by: johanco123 on August 01, 2014, 04:31:02 AM
I use the following

sub(p_web.gsv('sp:description'),1,1))

tanks
Title: Re: How do I get the first character in gsv?
Post by: JohanR on August 01, 2014, 08:26:51 AM
Hi Johan

Try to move the session var to a local var first and then slice it

Johan



Title: Re: How do I get the first character in gsv?
Post by: Bruce on August 01, 2014, 10:18:06 PM
>> Try to move the session var to a local var first and then slice it

why? sub works just fine.

Cheers
Bruce