Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

LIKE operator in input form

Avatar

Avatar
Validate 1
Level 2
tejashriw155148
Level 2

Likes

12 likes

Total Posts

70 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back
Boost 5
View profile

Avatar
Validate 1
Level 2
tejashriw155148
Level 2

Likes

12 likes

Total Posts

70 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back
Boost 5
View profile
tejashriw155148
Level 2

09-09-2020

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>

 

tejashriw155148_0-1599663599176.png

 

 

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.

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

960 likes

Total Posts

1,087 posts

Correct Reply

506 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

960 likes

Total Posts

1,087 posts

Correct Reply

506 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
wodnicki
MVP

13-09-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

 

 

Answers (0)