parametric field of SET datatype and Meta tag

Post Reply
michel.weber
Posts: 256
Joined: Sat Oct 08, 2005 12:40 pm

parametric field of SET datatype and Meta tag

Post by michel.weber »

I'm trying to fill a parametric field defined as SET datatype from HTML Meta tag containing multiple values via the 'Data from Field' option

As an added difficulty, the values i have to extract contain ','.

I have figured out a REX that works and returns the correct set members, but i haven't figured a way to tell to put that result into the parametric field as separate set members

Ex.:
<meta name="m1" content="item1=a,b,item2=c">

The retrieved set should be : ('a,b','c') i.e. two items.


In the replace part i have tried the following syntaxes but i always end up with one set member :
!!\2,!!\5!! ==> ('!!a,b!!,c!!')
I expected this one to work or berhaps give me 3 set members

I tried the followin as well just in case
!!\2|!!\5!! ==> ('!!a,b!!|c!!')
!!\2 !!\5!! ==> ('!!a,b!! c!!')
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

parametric field of SET datatype and Meta tag

Post by Kai »

You don't need a replace expression; you can make a search expression that just returns what is needed:

>>item=\digit+\=\P=!,item+'

i.e. look for everything after an `itemN=' tag, up to (but not including) the next `,item' tag (if any). This assumes no space separation in the list (remove the comma if so, or use a replace expression to remove trailing space/commas).
michel.weber
Posts: 256
Joined: Sat Oct 08, 2005 12:40 pm

parametric field of SET datatype and Meta tag

Post by michel.weber »

Thanks for the quick reply

just as a matter of interest, why does the replace part not work?
michel.weber
Posts: 256
Joined: Sat Oct 08, 2005 12:40 pm

parametric field of SET datatype and Meta tag

Post by michel.weber »

MMh

This now works as long as i walk the pages, but it does not seem to work with the DATALOAD API (SOAP)

If i remember correctly this was not supported in older scripts, but i was under the impression that it was working now (see http://thunderstone.master.com/texis/ma ... b97c7251a=

Can you confirm that this should work with appliance 7.1.8 or / and webinator 5.1.88.
michel.weber
Posts: 256
Joined: Sat Oct 08, 2005 12:40 pm

parametric field of SET datatype and Meta tag

Post by michel.weber »

Kai

I modified your rex a little bit to get at the "itemN" parts : >>item=[A-Z\-]+[a-zA-Z0-9\-]+\=\F=!, item+

Given the same example : <meta name="m1" content="itemToto=a,b, itemMachin=c">

It works fine with a field of type SET where i get a set of (itemToto,itemMachin)
but with a field of type TEXT, i only get the first 'item' ie. 'itemToto'

I could not figure out one that gives me all of them

Can you help a bit more?

How would i get "item1,item2,...,itemN" into a parametric field of type TEXT
User avatar
John
Site Admin
Posts: 2613
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

parametric field of SET datatype and Meta tag

Post by John »

There isn't a way to pull multiple items out and string them back together.

The data from field should work with the DataLoad if you specify "RawData" to be parsed. If you give it Body instead then it is assumed to be pre-parsed and you are providing all the fields as you want them.
John Turnbull
Thunderstone Software
Post Reply