Object Condition find string in comma delimited list

Michael_S
Senior Member
Beiträge: 160
Registriert: Mi 4. Feb 2004, 02:39
Wohnort: London / UK
Kontaktdaten:

Object Condition find string in comma delimited list

Beitragvon Michael_S » Fr 6. Jun 2014, 12:05

Hi,

Using a Object condition how would I find all objects containing a string held in a field with comma delimited list?

Var: $con = my string 2
Field: Node_Container
Data: my string 1, my string 2, my string 3

I guess I would need to use "is_string" in the condition but not sure where to start.

Michael.
Production Area
London, UK
http://productionarea.com

Benutzeravatar
Carrear
webEdition Partner
webEdition Partner
Beiträge: 646
Registriert: Do 17. Jan 2013, 03:02
Wohnort: Hannover
Kontaktdaten:

Re: Object Condition find string in comma delimited list

Beitragvon Carrear » Fr 6. Jun 2014, 12:36

I would try it with

conditionAdd, operator like and value ,term
conditionor
conditionAdd, operator like and value term,
conditionor
conditionAdd, operator like and value ,term,

... not sure if it works

EDIT - Should be
%,term
term,%
%,term,%

Michael_S
Senior Member
Beiträge: 160
Registriert: Mi 4. Feb 2004, 02:39
Wohnort: London / UK
Kontaktdaten:

Re: Object Condition find string in comma delimited list

Beitragvon Michael_S » Fr 6. Jun 2014, 12:57

Carrear hat geschrieben:I would try it with

conditionAdd, operator like and value ,term
conditionor
conditionAdd, operator like and value term,
conditionor
conditionAdd, operator like and value ,term,

... not sure if it works

EDIT - Should be
%,term
term,%
%,term,%
Hi Carrear, that was spot on ... cheers.

Code: Alles auswählen

Object Field: Node_Container
Data: my string 1, my string 2, my string 3

<we:field nameto="con" to="global" type="text" name="NodeContainer_Name" />

<we:condition name="conNode">
	<we:conditionAdd field="Node_Container" compare="LIKE" var="%con%" type="global" />
</we:condition>

<we:listview condition="\$conNode"></we:listview>
Production Area
London, UK
http://productionarea.com


Zurück zu „DB / Object Module“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 Gäste