cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Modeling rule - Test if name like xxx

mrajih_DTCC
Super Contributor

Hi,

 

How can I test if an Org process name is like "FS - " ?

 

The code I use in a query is : Short Name like "FS - #"

What would be the equivalent for a metatest ?

 

Thank you

Mehdi

2 Replies

Yes I this is the option I used. Below the macro :

 

##################################################

 

Dim sOrgProcName

blnTestResult = False

sOrgProcName = mgobjToBeTested.GetProp("Short Name")
If Left(sOrgProcName, 5) = "FS - " Then
blnTestResult = True
End
 if

End Sub

 

#####################################################

 

Hope it helps other people.

 

Thanks

Mehdi

Sashidhar
Super Contributor

You can write implementation Macro 
Sub RuleApply (oToBeRuled, oRule, sParameters, bRuleResult)


bRuleResult = true
tempStr  = oToBeRuled.getprop("Short Name")

 
end sub