Re: [WebDNA] suggestion: listwords return xth word

This WebDNA talk-list message is from

2017


It keeps the original formatting.
numero = 113428
interpreted = N
texte = 1022 --Apple-Mail=_D1A0CB15-7F81-4182-8086-0DAF4341ADCD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Startcount & endcount ? Sounds like a very useful feature, would save on multiple MIDDLE. It needs more emphasis in the docs as a PARAMETER & DESCRIPTION rather = than a little side note at the bottom. Where else can startcount, endcount be used? http://www.webdna.us/page.dna?numero=3D270 Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@idfk.com.au > On 25 Feb 2017, at 18:29, christophe.billiottet@webdna.us wrote: >=20 > You could also use [middle] >=20 > [text]myVar=3D_ID:2:firstname[/text] >=20 > [middle endbefore=3D:&endcount=3D-1][myVar][/middle] >
> [middle startafter=3D:&endbefore=3D:][myVar][/middle] >
> [middle startafter=3D:&startcount=3D2][myVar][/middle] >=20 > to extract the values > - chris >=20 >> On Feb 24, 2017, at 21:56, Brian Burton wrote: >>=20 >> Currently, to parse a complex incoming variable (_ID:2:firstname) you = have to jump thru this hoop >> [listwords delimiters=3D:&words=3D[name]][showif = [index]=3D2][word][/showif][/listwords] >>=20 >> It would be great if listwords could be told just to kick out one = word, i.e. >> [listwords delimiters=3D:&words=3D[name]&index=3D2][word][/listwords] >>=20 >>=20 >>=20 >> my function solution is: >> [function name=3Dgetword] >> -- incoming variables are $string,$D (delimiter),$P (position) -- >> [return][listwords delimiters=3D[$D]&words=3D[$string]][showif = [index]=3D[$P]][word][/showif][/listwords][/return] >> [/function] >>=20 >> which is even shorter to use: >> [getword $D=3D:&$P=3D2&$string=3D[name]] >=20 >=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us --Apple-Mail=_D1A0CB15-7F81-4182-8086-0DAF4341ADCD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Startcount & endcount ?

Sounds like a very useful feature, = would save on multiple MIDDLE.

It needs more emphasis in the docs as a = PARAMETER & DESCRIPTION rather than a little side note at the = bottom.

Where = else can startcount, endcount be used?




Kind regards

Stuart Tremain
Pharoah Lane = Software
AUSTRALIA






On 25 Feb 2017, at 18:29, christophe.billiottet@webdna.us wrote:

You = could also use [middle]

[text]myVar=3D_ID:2:firstname[/text]

[middle endbefore=3D:&endcount=3D-1][myVar][/middle]
<br>
[middle = startafter=3D:&endbefore=3D:][myVar][/middle]
<br>
[middle = startafter=3D:&startcount=3D2][myVar][/middle]

to extract the values
- chris

On Feb 24, 2017, at = 21:56, Brian Burton <brian@burtons.com> wrote:

Currently, to parse a complex incoming variable = (_ID:2:firstname) you have to jump thru this hoop
[listwords= delimiters=3D:&words=3D[name]][showif = [index]=3D2][word][/showif][/listwords]

It = would be great if listwords could be told just to kick out one word, = i.e.
[listwords = delimiters=3D:&words=3D[name]&index=3D2][word][/listwords]



my function = solution is:
[function name=3Dgetword]
-- = incoming variables are $string,$D (delimiter),$P (position) --
[return][listwords = delimiters=3D[$D]&words=3D[$string]][showif = [index]=3D[$P]][word][/showif][/listwords][/return]
[/function]

which is even = shorter to use:
[getword = $D=3D:&$P=3D2&$string=3D[name]]




---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us>.
To unsubscribe, E-mail = to: <talk-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
Bug= Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us --Apple-Mail=_D1A0CB15-7F81-4182-8086-0DAF4341ADCD-- . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] suggestion: listwords return xth word (Stuart Tremain 2017)
  2. Re: [WebDNA] suggestion: listwords return xth word (christophe.billiottet@webdna.us 2017)
  3. [WebDNA] suggestion: listwords return xth word (Brian Burton 2017)
1022 --Apple-Mail=_D1A0CB15-7F81-4182-8086-0DAF4341ADCD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Startcount & endcount ? Sounds like a very useful feature, would save on multiple MIDDLE. It needs more emphasis in the docs as a PARAMETER & DESCRIPTION rather = than a little side note at the bottom. Where else can startcount, endcount be used? http://www.webdna.us/page.dna?numero=3D270 Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@idfk.com.au > On 25 Feb 2017, at 18:29, christophe.billiottet@webdna.us wrote: >=20 > You could also use [middle] >=20 > [text]myVar=3D_ID:2:firstname[/text] >=20 > [middle endbefore=3D:&endcount=3D-1][myVar][/middle] >
> [middle startafter=3D:&endbefore=3D:][myVar][/middle] >
> [middle startafter=3D:&startcount=3D2][myVar][/middle] >=20 > to extract the values > - chris >=20 >> On Feb 24, 2017, at 21:56, Brian Burton wrote: >>=20 >> Currently, to parse a complex incoming variable (_ID:2:firstname) you = have to jump thru this hoop >> [listwords delimiters=3D:&words=3D[name]][showif = [index]=3D2][word][/showif][/listwords] >>=20 >> It would be great if listwords could be told just to kick out one = word, i.e. >> [listwords delimiters=3D:&words=3D[name]&index=3D2][word][/listwords] >>=20 >>=20 >>=20 >> my function solution is: >> [function name=3Dgetword] >> -- incoming variables are $string,$D (delimiter),$P (position) -- >> [return][listwords delimiters=3D[$D]&words=3D[$string]][showif = [index]=3D[$P]][word][/showif][/listwords][/return] >> [/function] >>=20 >> which is even shorter to use: >> [getword $D=3D:&$P=3D2&$string=3D[name]] >=20 >=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us --Apple-Mail=_D1A0CB15-7F81-4182-8086-0DAF4341ADCD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Startcount & endcount ?

Sounds like a very useful feature, = would save on multiple MIDDLE.

It needs more emphasis in the docs as a = PARAMETER & DESCRIPTION rather than a little side note at the = bottom.

Where = else can startcount, endcount be used?




Kind regards

Stuart Tremain
Pharoah Lane = Software
AUSTRALIA






On 25 Feb 2017, at 18:29, christophe.billiottet@webdna.us wrote:

You = could also use [middle]

[text]myVar=3D_ID:2:firstname[/text]

[middle endbefore=3D:&endcount=3D-1][myVar][/middle]
<br>
[middle = startafter=3D:&endbefore=3D:][myVar][/middle]
<br>
[middle = startafter=3D:&startcount=3D2][myVar][/middle]

to extract the values
- chris

On Feb 24, 2017, at = 21:56, Brian Burton <brian@burtons.com> wrote:

Currently, to parse a complex incoming variable = (_ID:2:firstname) you have to jump thru this hoop
[listwords= delimiters=3D:&words=3D[name]][showif = [index]=3D2][word][/showif][/listwords]

It = would be great if listwords could be told just to kick out one word, = i.e.
[listwords = delimiters=3D:&words=3D[name]&index=3D2][word][/listwords]



my function = solution is:
[function name=3Dgetword]
-- = incoming variables are $string,$D (delimiter),$P (position) --
[return][listwords = delimiters=3D[$D]&words=3D[$string]][showif = [index]=3D[$P]][word][/showif][/listwords][/return]
[/function]

which is even = shorter to use:
[getword = $D=3D:&$P=3D2&$string=3D[name]]




---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <talk@webdna.us>.
To unsubscribe, E-mail = to: <talk-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
Bug= Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us --Apple-Mail=_D1A0CB15-7F81-4182-8086-0DAF4341ADCD-- . Stuart Tremain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

PCS Emailer's role ? (1997) Adding Message to Order (1997) For those of you not on the WebCatalog Beta... (1997) vs (1997) 2.0 Info (1997) [WebDNA] How much does it cost now? (2008) [searchString] (1997) Strange search... (2001) Missing from Docs [folderName] (1997) WebCat & Backoffice Solution? (2000) Validation (2000) shipcost (1997) more trouble with [showif] in [search] = busted [shownext] (2000) Problems when user hit back (2000) search function (2005) Finding max value for a field (1997) [WebDNA] Digest from talk@webdna.us (2013) Prepaid monthly subscription order fulfillment question (2004) Multiple catalog databases and showcart (1997) [WebDNA] WebDNA glitch, no response required ... (2009)