![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Filter for "Created On" = "Today" Topic Summary: Created On: 6-Jun-2007 15:45 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Simple, simple, simple. I forgot the parenthesis around the compared objects. The following script works just fine!! Thanks again!! Module m = current Object o Date d2 = dateOnly(today) for o in m do { Date d1 = o."Created On" if (d1 == d2) { print d2 }//end if }//end do | |
![]() |
|
This should be simple, but I can't seem to get it right!! I've gone through all the DXL Help files in DOORS, but can't seem to locate a method for filtering a module to display only those objects that were created "today". It seems I have to specify today's date, but since I want to include this script as part of a batch process, "today" will always be the current date from day-to-day. I don't want to have to manually change the date each day, since that would defeat the purpose of the batch process. Does DXL include a variable for "today" that will be interpreted as "get the current date"?
|
|
![]() |
|
![]() |
|
Hi Chris,
you are so near to the resolution, that you won't see it ;-)) You are right! There is a function to get the current date (and time) - it is called Date today () You can convert the result to string by adding an empty string: print today"" BTW: You should not have defined a variable named today. If so, Doors will prefer this and prevent you from calling function today() !! Grretings Reik ------------------------- Evosoft GmbH for Siemens Industry Sector Berlin, Germany |
|
![]() |
|
![]() |
|
Thanks Reik, That set me on the right path. However, I'm still getting syntax issues with the following script, which is only a test to see if I can at least display the date in the DXL window. (Once I get this working, I plan on using it as the basis for filtering to display only objects that meet this condition in the module: Module m = current Object o Date d2 = dateOnly(today) for o in m do { Date d1 = o."Created On" if d1 == d2 { print d1 } } |
|
![]() |
|
![]() |
|
Oops. I forgot to mention that if I remove the conditional (if) statement and the curly brackets above and below the "print" statement, then it will print either d1 or d2 when I want it to - it's only the syntax of the comparison (regardless of whether I use "=" or "==" for comparision) that seems to be the source of the syntax error, as far as I can tell.
Thanks!! Chris |
|
![]() |
|
![]() |
|
Simple, simple, simple. I forgot the parenthesis around the compared objects. The following script works just fine!! Thanks again!!
Module m = current Object o Date d2 = dateOnly(today) for o in m do { Date d1 = o."Created On" if (d1 == d2) { print d2 }//end if }//end do |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Filter for "Created On" = "Today"
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.