メールフィルターの設定方法

初心者質問で申し訳ございません。
以前Outlookメールのフィルターについて教えていただきました。

“@SQL= urn:schemas:httpmail:textdescription LIKE ‘%りんご%’”

この検索値を固定値ではなくUiPathで指定した変数で設定したいのですが、どのように書けばよいのでしょうか。
よろしくお願い致します。

Hi @m-takeda1

=> Use the below syntax in Assign activity and intialize the search term
searchTerm = "apple"

=> Use the below filter query:
"@SQL=urn:schemas:httpmail:textdescription LIKE '%" + searchTerm + "%'"

Regards

こんにちは

別解です。Windowsプロジェクトですと補間文字列が使えますのでこちらの方がミスが少なるかと。以下お試しください。strVarが検索文字列です(構文としての特殊文字がある場合は別途対応が必要です)

$"@SQL= urn:schemas:httpmail:textdescription LIKE '%{strVar}%'"

迅速に教えていただきありがとうございました!

1 Like

こちらでもうまくいきました!
ありがとうございます!!

You’re welcome @m-takeda1

Happy Automation!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.