Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
MT4T
Creator
Creator

Nested if + wildmatch

Hi,

 

I have struggle with this calculated field I need to make.

In first case i need to mark all rows that contains "TBC" in field Customer PO as "DUMMY-COMMITED"

In secon case i need to mar all rows that contains "DUMMY" as "DUMMY"

Rest should be marked as "COMMITED"

Is there any expression that should solve this?

l(If(WildMatch([Customer PO],'TBC'),'DUMMY-COMMITED',(IF(WildMatch([Customer Code],'DUMMY'),'DUMMY','COMMITED'))))

Labels (2)
1 Solution

Accepted Solutions
sidhiq91
Specialist II
Specialist II

@MT4T As @BrunPierre  mentioned you can just use his logic, or if you wanted to use wildmatch in your expression there is a slight change, please see as below:

if(wildmatch([Customer PO],'*TBC*'),'DUMMY-COMMITED',

if(wildmatch([Customer PO],'*DUMMY*'),'DUMMY','COMMITED'))

View solution in original post

4 Replies
Rockstar7
Partner - Creator
Partner - Creator

@MT4T 

Provide any sample data to understand better

BrunPierre
Master
Master

@MT4T Per your logic this simple statement in the script should work

IF([Customer PO]='TBC','DUMMY-COMMITED',
IF([Customer Code]='DUMMY','DUMMY','COMMITED') AS [Field Name]

sidhiq91
Specialist II
Specialist II

@MT4T As @BrunPierre  mentioned you can just use his logic, or if you wanted to use wildmatch in your expression there is a slight change, please see as below:

if(wildmatch([Customer PO],'*TBC*'),'DUMMY-COMMITED',

if(wildmatch([Customer PO],'*DUMMY*'),'DUMMY','COMMITED'))

MT4T
Creator
Creator
Author

Thank you, save my day. The missing "*" was an issue.