تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2696 أدوات العرض

Hello,

We are migrating from version 14 to version 15 and were wondering how to create SMS templates which use nested if statements in version 15?

Here is an example of version 14 SMS template code we wish to convert to version 15.


% if ctx['delivery_order'].name == 'WH/OUT/00001':
    % if ctx['delivery_order'].state == 'done':
        TEXT A
    % else:
        TEXT B
الصورة الرمزية
إهمال
أفضل إجابة

You can try the below:

{{ (text_A if ctx['delivery_order'].state == 'done' else text_B) if ctx['delivery_order'].name == 'WH/OUT/00001' else ''}}

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
سبتمبر 22
4200
1
ديسمبر 22
2452
1
نوفمبر 22
2359
0
أكتوبر 22
1820
0
أبريل 23
3040