搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Using if then else in Mail Merge Add-on

  • 1 回覆
  • 0 有這個問題
  • 最近回覆由 Matt

more options

I’m wanting to include one of two sentences in my email depending on the content of a “Status” field, which will be either N or R. The syntax I tried was {{Status |N|Thank you very much for joining our Society. |Thank you for renewing your membership of our Society}} However, all the resulting emails contained the second text… Could anyone tell me what I am doing wrong please?

Malcolm

I’m wanting to include one of two sentences in my email depending on the content of a “Status” field, which will be either N or R. The syntax I tried was {{Status |N|Thank you very much for joining our Society. |Thank you for renewing your membership of our Society}} However, all the resulting emails contained the second text… Could anyone tell me what I am doing wrong please? Malcolm

所有回覆 (1)

more options

This is not the support forum for the addon. The author provides an email address for this if I recall correctly.

However the download page offer this

{{name|if|then|else}}
If the value of the field name equals if, then the variable will be replaced by then, else by else.

A couple of things spring to mind. If using CSV files, often you find blank spaces before of after values which do not translate to the value you see and are testing. Commonly text values are wrapped in "quotes" when you test on them. None of the examples are, but I do wonder if they need to be in practice.

Or perhaps Status | is what is not recognized and it should be expressed as Status|

有幫助嗎?

問個問題

如果您還沒有帳號,您必須先登入帳號 來回覆文章。還沒有帳號的話,只能發問新問題