Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odgovori
15374 Prikazi

 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
Opusti
Best Answer

Hi,

Try it like this, it normally works

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

Avatar
Opusti
Avtor

It works, thanks :)

Best Answer

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

Correct me,If I am wrong
 Thank you


Avatar
Opusti
Best Answer

My guess is that it should probably be unicode:

<t t-if="u'Total' in a.name">
Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
feb. 18
3426
0
feb. 18
3327
1
jul. 25
1729
1
maj 25
1736
1
apr. 25
2294