I need an AND statement in variable below so if it finds both parts in a string it returns another value.
= If Match( ,“Partner”) Then “PARTNER” Else If Match( ,“Distribution”) Then “DISTRIBUTION” Else If Match ( ,“Partner” AND “Distrubution”) Then “BOTH” Else If Match ( ,“Direct to Customer/Prospect”)Then " Direct to Customer/Prospect" Else “”
=
If Match (<Sync Description> ,"*Partner*")
Then "PARTNER"
Else If Match (<Sync Description> ,"*Distribution*")
Then "DISTRIBUTION"
Else If Match (<Sync Description> ,"*Partner*")
AND Match (<Sync Description> , "*Distrubution*")
Then "BOTH"
Else If Match (<Sync Description> ,"*Direct to Customer/Prospect*")
Then " Direct to Customer/Prospect"
Else ""
We are talking about a report variable, this will only look on the dataset your database has come up with. Has nothing to do with your query on a database.
Thanks for the help but so far no joy. It seems to find the Partner (wildcard) part first and ignore if later on it frinds the Parter AND Distribution part.
Thanks tried this, but still no joy. Still only returns one and not both.
= If Match ( ,“Partner”) And Match ( , “Distrubution”) Then “BOTH” Else If Match ( ,“Distribution”) Then "DISTRIBUTION"Else If Match ( ,“Partner”) Then “PARTNER” Else If Match ( ,“Direct to Customer/Prospect”) Then “Direct to Customer/Prospect” Else “”