![]() |
Telelogic Lifecycle Solutions (steve huntington) | ![]() |
Topic Title: String Comparisons in the Rules File Topic Summary: How to test strings in the if statement Created On: 17-Apr-2007 21:59 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I'm trying to write a script to test for the value contained in %%$Module.Name%%, but cannot determine the proper syntax. Can you assist?
|
|
![]() |
|
![]() |
|
The rules file is just a DXL file. Use this:
Module m = current string myName = m."Name" if myName == "D1041-0185") ------------------------- Bob Mathis Robert.S.MATHIS@odot.state.or.us |
|
![]() |
|
![]() |
|
You may also use the o. reference to the attribute, as in the attached snippet:
if (o.Priority = "Mandatory"){
template = "c:\\Documents and Settings\\cliff\\Desktop\\DocExpress\\Templates\\StndView_red.dot"
} else if (o.Priority = "desirable"){
template = "c:\\Documents and Settings\\cliff\\Desktop\\DocExpress\\Templates\\StndView_blue.dot"
} else {
skip = true
}
This uses a template that emphasizes the attribute with color, based on the contents of "Priority" being either Mandatory, or desirable
|
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.