Question
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689993000/34e2fb88-5a16-4b7c-b901-4370fa0dd1ca.jpg?itok=nGScIuKe)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689993000/34e2fb88-5a16-4b7c-b901-4370fa0dd1ca.jpg?itok=nGScIuKe)
RABO BANK
NL
Last activity: 12 Mar 2016 6:59 EST
Match/Contains tag in HTML
Hi All,
Can you please help on me the following case.
i know the syntax for exact match condition
<pega:when test=".Color == 'RED' " ></pega:when >
What is the syntax for "Contains or Like " ??
Thanks
Suresh Chella
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/6edb6beb-cf8e-431c-9679-ef67ce5f3aba.jpg?itok=hzTHfrBw)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/6edb6beb-cf8e-431c-9679-ef67ce5f3aba.jpg?itok=hzTHfrBw)
Pegasystems Inc.
US
You could use java attibute:
java |
A Java expression that evaluates to true or false. You can use the Java operators any standard Java operators within the expression. For example: <pega:when java="<%= !tools.getProperty("OperatorID.pyPwdVerify").getMessages().equals("") %>"></pega:when> |
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689993000/34e2fb88-5a16-4b7c-b901-4370fa0dd1ca.jpg?itok=nGScIuKe)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689993000/34e2fb88-5a16-4b7c-b901-4370fa0dd1ca.jpg?itok=nGScIuKe)
RABO BANK
NL
Hi Kevin,
Can you suggest on the below example.
Lets take i have Page1.pxRresults(5) , then i have to loop find out Page1.pxRresults( ).Name contains any one of ( A,B,C) then it should satisfy the condition otherwise no action required.
Can you suggest me the syntax .
Thanks
Suresh Chella
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689954000/5e1df259-88ec-40db-aa4a-a5b27280a5f7.jpg?itok=ChGegHBG)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689954000/5e1df259-88ec-40db-aa4a-a5b27280a5f7.jpg?itok=ChGegHBG)
Pegasystems Inc.
US
Hi Suresh,
Can you try
@(Pega-RULES:String).contains(.Name, "A")?
Thanks,
Susan
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689993000/34e2fb88-5a16-4b7c-b901-4370fa0dd1ca.jpg?itok=nGScIuKe)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689993000/34e2fb88-5a16-4b7c-b901-4370fa0dd1ca.jpg?itok=nGScIuKe)
RABO BANK
NL
Thanks Susan.
Can you suggest me will this work HTML ?, if so please share me exact syntax
Thanks
Suresh
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689970000/f1a4bbe7-fa93-47f7-8df9-154b82d8fd4c.jpg?itok=6g_Abh9b)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689970000/f1a4bbe7-fa93-47f7-8df9-154b82d8fd4c.jpg?itok=6g_Abh9b)
Coforge DPA
IN
Hi Suresh,
Can you try the below one.
ClipboardPage Page1=tools.findPage(Page);
for (i=1;i<=@lengthOfPageLise(Page1);i++)
{
String color=Page1.pxResults(i).Color
if(Color=="A" || Color=="B" ) {
}
}
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems
US
I think you have to mention pxResults on this line:
for (i=1;i<=@lengthOfPageLise(Page1);i++)
/Eric
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Pegasystems Inc.
IN
>>>
- i know the syntax for exact match condition
- <pega:when test=".Color == 'RED' " ></pega:when >
- What is the syntax for "Contains or Like " ??
>>>
could we attempt creating a direct when rule and refer inline?
- <pega:when name="WHENRULE"></pega:when>