Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3540 Lượt xem

Dear all ,

i want to add the priority name in email template and this field is selection field , when i type

priority : ${object.priority} ---> it show in the email only number of selection " 1 "

but i need priority name : highest or high or normal.

how can i get that from mail template ?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

There is no direct approach to this, but can be achieved in a round about manner.

%if object.priority==1:
       Highest
%elif object.priority==2:
       High
%elif object.priority==3:
       Normal
%else:
      Something here
%endif

Ảnh đại diện
Huỷ bỏ
Tác giả

thanks for your reply , could you tell me how can i write condition in email template? i mean the syntaxfor that . the priority is ${object.priority}

this code works in email template i.e. %if then %endif is the standard way of checking a condition at email template.