cancel
Showing results for 
Search instead for 
Did you mean: 

Email Recieve View Problem? Using matches or equals

Former Member
0 Kudos

hi all,

currently i take a email receive view from the Email Interactive Form Tutorial

but currently i have some problem with the subject get... function

in the tutorial it teach this

<b>if (message<i>.getSubject().equals("Travel Request Form")) {</b>

but then it only get email with the subject "Travel Request Form" but if i want to display email with the subject "Travel" or "Request" or "Form" in other way also can say like that "TravelRequestForm"

and the code i code is this

<b>if (message<i>.getSubject().matches("
Travel") || message<i>.getSubject().matches("
Request") || message<i>.getSubject().matches("
Form") || message<i>.getSubject().equals("Travel Request Form")) {</b>

but if like that code.. i can display if the subject is travel or request or form but if the subject is travel request data it is not able to display.

hope you all can advise me how to change this code to get.. subject with Travel Request Data? or even the subject with Travel Request

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can try this:

int tIndex = message.indexOf("Travel");
int rIndex = message.indexOf("Request");
int fIndex = message.indexOf("Form");

if(tIndex != -1 || rIndex != -1 || fIndex != -1){
//process...
}

Regards,

Satyajit.

Answers (0)