Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Lifecycle Solutions (steve huntington)
Decrease font size
Increase font size
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
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 17-Apr-2007 21:59
User is offline View Users Profile Print this message


Larry Bunch

Posts: 1
Joined: 17-Apr-2007

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?
Report this to a Moderator Report this to a Moderator
 18-Apr-2007 23:03
User is offline View Users Profile Print this message


Bob Mathis

Posts: 32
Joined: 12-Apr-2005

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
Report this to a Moderator Report this to a Moderator
 19-Apr-2007 13:47
User is offline View Users Profile Print this message


Clifford Sadler

Posts: 7
Joined: 18-Apr-2007

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Lifecycle Solutions forum.
There are currently 2 users logged in.
The most users ever online was 14 on 29-Jul-2008 at 13:55.
There are currently 0 guests browsing this forum, which makes a total of 2 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.