Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
15197 Zobrazení

 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šit
Nejlepší odpověď

Hi,

Try it like this, it normally works

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

Avatar
Zrušit
Autor

It works, thanks :)

Nejlepší odpověď

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

Correct me,If I am wrong
 Thank you


Avatar
Zrušit
Nejlepší odpověď

My guess is that it should probably be unicode:

<t t-if="u'Total' in a.name">
Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
úno 18
3311
0
úno 18
3187
1
kvě 25
1287
1
dub 25
2034
1
úno 25
1288