Super Contributor.. vigneshwar Super Contributor..
Super Contributor..
915 views

Active Channel Filter vs Rule

I want to make sure I apply the correct Regex for this String as I am not able to use the same filter I have in the active channel in the rule. Basically I need to match for a String field that starts with a white space followed by an &- end of String. In the Active List filter String = " &" does not work but String starts with " &" works and seems like that filter works for my use case. But I am not able to apply the same filter in a rule condition. It remove the double quotes and the space in front when I apply and save the rule with this filter. I want to make sure I do this right. Should I apply Regex instead for a rule. I wonder if this would work. String Matches "^\\s(&)$". Thoughts, ideas, please share.

Regards

Vignesh

Labels (3)
0 Likes
4 Replies
subindbabu Honored Contributor.
Honored Contributor.

Re: Active Channel Filter vs Rule

Hi Vignesh,

Try to use a "velocity Template" local variable(L1) in the rule and using "stringTrim" function, remove the white space from the field.Now you use "L1 starts with &"

Logically it will work. Kindly let me know , if you need details on this.

--SUBIN--

--SUBIN--
0 Likes
rkent1 Acclaimed Contributor.
Acclaimed Contributor.

Re: Active Channel Filter vs Rule

You should be able to make a filter object with that criteria (i.e [field startswith " &"]), and then see if that saves correctly. Then, from your rule, reference the whole filter.

The velocity template is another option, with multiple ways to skin the cat there.

0 Likes
Super Contributor.. vigneshwar Super Contributor..
Super Contributor..

Re: Active Channel Filter vs Rule

Thanks Subin

Will try and keep you posted.

Regards

0 Likes
Super Contributor.. vigneshwar Super Contributor..
Super Contributor..

Re: Active Channel Filter vs Rule

Thanks Rich

That is a clever thought. Will keep you posted.

Regards

Vignesh

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.