iLogic Reading beginning of Filename

This widget could not be displayed.

iLogic Reading beginning of Filename

Anonymous
Not applicable

I'm attempting to create a rule using iLogic, which reads the first two letters of either the File Name or Part number (Which ever is easier)

i.e. if a part number was AB12345, I would want the code to recognize the "AB"

At which point I'm trying to use an If-Then-Else statement to modifiy the material of the part, dependent on the first two characters of the File name.

Is this possible?

 

As an example, where the underlined portion is what i don't know how to code:
If  iProperties.Value("Project", "Part Number") Begins with "AB" Then
    iProperties.Material = "Steel"
Else If iProperties.Value("Project", "Part Number") Begins with "AC" Then
    iProperties.Material = "Aluminum"
End If

 

Thanks
-Dan

0 Likes
Reply
Accepted solutions (1)
882 Views
1 Reply
Reply (1)

Anonymous
Not applicable
Accepted solution

I Figured this one out i went with
If Left(iProperties.Value("Project", "Part Number"),2)= "AB" Then
    iProperties.Material = "Steel"
Else If Left(iProperties.Value("Project", "Part Number"),2)= "AC" Then
    iProperties.Material= "Aluminum"
End If