Skip to Content
Menu
This question has been flagged
3 Replies
15192 Zobrazenia

 I would like to use t-if condition to check whether a field name (Ex.: 'Total Value') contains a string '**Total**'. I tried using:

t-if = 'Total' in a.name but it seems to check whether a.name is equal to 'Total'. 

Avatar
Zrušiť
Best Answer

Hi,

Try it like this, it normally works

<t t-if="'Total' in a.name">

Avatar
Zrušiť
Autor

It works, thanks :)

Best Answer

<t t-if="'Total' in a.name">

Correct me,If I am wrong
 Thank you


Avatar
Zrušiť
Best Answer

My guess is that it should probably be unicode:

<t t-if="u'Total' in a.name">
Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
feb 18
3310
0
feb 18
3184
1
máj 25
1268
1
apr 25
2032
1
feb 25
1269