Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2715 Vizualizări

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
Imagine profil
Abandonează
Cel mai bun răspuns

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 ''}}

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
sept. 22
4206
1
dec. 22
2463
1
nov. 22
2387
0
oct. 22
1823
0
apr. 23
3047