LIKE operator in input form | Community
Skip to main content
tejashriw155148
Level 4
September 9, 2020
Solved

LIKE operator in input form

  • September 9, 2020
  • 1 reply
  • 1204 views

Hi,

 

Please suggest me how can I add wildcard operator LIKE in the delivery input form.

I tried below code but getting error when open SMS delivery template:

 

<if expr="EV(@messageType, 'sms')">
<check expr="[../content/sms/source] LIKE '%Adobe Campaign' ">
<error>"SMS content shoulf contain Adobe Campaign."</error>
</check>
</if>

 

 

 

So I tried below login in nms:delivery input form to send alert message if Adobe Campaign text not present in the SMS content:

 

<if expr="EV(@messageType, 'sms')">
<soapCall name="CheckSMSContent" service="lf:SMSContent">
<param exprIn="[../content/sms/source]" type="string"/>
</soapCall>

</if>

 

 

Please let me know what logic I should add in the javascript file.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jonathon_wodnicki

Hi,

 

As the error states, 'like' isn't supported in internal expressions.

JS you'd want to return input.match('text').

A safer way of checking content is via a control typology rule, as you can check interpolated content and the security's not in the UI.

 

Thanks,

-Jon

 

 

1 reply

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
September 14, 2020

Hi,

 

As the error states, 'like' isn't supported in internal expressions.

JS you'd want to return input.match('text').

A safer way of checking content is via a control typology rule, as you can check interpolated content and the security's not in the UI.

 

Thanks,

-Jon