コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
15385 ビュー

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

アバター
破棄
最善の回答

Hi,

Try it like this, it normally works

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

アバター
破棄
著作者

It works, thanks :)

最善の回答

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

Correct me,If I am wrong
 Thank you


アバター
破棄
最善の回答

My guess is that it should probably be unicode:

<t t-if="u'Total' in a.name">
アバター
破棄
関連投稿 返信 ビュー 活動
1
2月 18
3433
0
2月 18
3330
1
7月 25
1734
1
5月 25
1741
1
4月 25
2300