Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

simple if contains statement

I know this must be a simple one to solve but I cant figue it out. I'm trying to break up some data based upon an ID field. If the ID begins with v then its a product else its an order. Currently running the below everything is displaying as an order, im guessing this be because its using the * as a character instead of a wildcard.

Can someone please point me in the right direction?


if("ID"='v*', 'products', 'orders') as datatype


Thanks

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello,

Use the following:

=IF(WILDMATCH(ID, 'V*'), 'products', 'orders')


Hope that helps

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hello,

Use the following:

=IF(WILDMATCH(ID, 'V*'), 'products', 'orders')


Hope that helps

Not applicable
Author

Many thanks, works perfectly!