Compute SMS content length

Avatar

Avatar

AC31271896

Avatar

AC31271896

AC31271896

21-02-2019

Hi,

I am looking to look for those SMS deliveries/delivery template through-out the AC instance where the content of the SMS exceeds 160 characters and I would want a list of all those campaigns exported.

I had a look at the delivery form and figured that while trying to preview any SMS delivery, it calculates the length and display the message if it exceeds more than 160 characters.

  <container colcount="2" colspan="2" type="visibleGroup" visibleIf="[/tmp/sms/preview/@length] &gt; 160">

                  <static/>

                  <static img="xtk:logwarn.png" label=" " nolabel="true">The content for this recipient exceeds the maximum SMS size of 160 characters.</static>

    </container>

How do I get access to [/tmp/sms/preview/@length] field via query activity so I can get the list of all SMS deliveries which has more than 160 chars??

Thanks.

View Entire Topic

Avatar

Avatar

AC31271896

Avatar

AC31271896

AC31271896

05-03-2019

Thanks Jon for being patient with me so far. Really appreciate your help.

I've tried putting it into array and then slice it afterwards, It ran all fine this time. However, the iValue column is still not updated to 1.

1705844_pastedImage_1.png

The trouble here is -  This statement " if ((res.@content + '').length > 160)"  is resulting length zero (0), hence the complete if condition is not getting executed as its checking for > 160.  Is it because of  res.@content is not getting stored in query result variable as its an XML field?

Thanks.