跳至内容
菜单
此问题已终结
1 回复
2823 查看

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
9月 22
4335
1
12月 22
2603
1
11月 22
2481
0
10月 22
1926
0
4月 23
3213