iLogic wild card help

iLogic wild card help

JUSTIN_BRADFORD
Contributor Contributor
432 Views
3 Replies
Message 1 of 4

iLogic wild card help

JUSTIN_BRADFORD
Contributor
Contributor

Here is skinny on what I've got and what I'm trying to do. 

 

I have a rule set on a part model template that assigns a company specific number to a customer property based off on material grade and thickness. That works great and populated the property as expected. 

 

iProperties->Custom tab-> "Material ID" is the property. The format is "XXXXXX-XXXX"  ex: 123456-1234

 

Now I'm trying to create a rule that will read this property and if the property reads "XXXXXX-0000" I want it to prompt the user with a message box that tells them to contact purchasing. I don't at all care what the numbers are for first 6 Xs only the -0000.

 

This is my code thus far. If I have it search for a number, 123456-0000, it will prompt just as expected. Everything I have found online for a Wildcard search doesn't prompt any results even thou I know they exist.  I put the X's in my code below to show where I want the wild card function.  

 

If iProperties.Value("Custom", "MATERIAL ID") = "XXXXXX-0000" Then
	MessageBox.Show("PLEASE REQUEST A SUPPLY CHAIN NUMBER FOR THIS MATERIAL", "Material Prompt", MessageBoxButtons.OK)
End If

  

0 Likes
Accepted solutions (1)
433 Views
3 Replies
Replies (3)
Message 2 of 4

dalton98
Collaborator
Collaborator
Accepted solution
If Right(iProperties.Value("Custom", "MATERIAL ID"), 4) = "0000" Then
	MessageBox.Show("PLEASE REQUEST A SUPPLY CHAIN NUMBER FOR THIS MATERIAL", "Material Prompt", MessageBoxButtons.OK)
End If
0 Likes
Message 3 of 4

JUSTIN_BRADFORD
Contributor
Contributor

Thanks for your help again! Much appreciated. 

0 Likes
Message 4 of 4

mat_hijs
Collaborator
Collaborator
If iProperties.Value("Custom", "MATERIAL ID") Like "######-0000" Then
	MessageBox.Show("PLEASE REQUEST A SUPPLY CHAIN NUMBER FOR THIS MATERIAL", "Material Prompt", MessageBoxButtons.OK)
End If

This should also work.

0 Likes