KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

View with new tests from last few days

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
cichockia



Joined: 19 Sep 2014
Posts: 31

PostPosted: Tue Nov 05, 2019 2:34 am    Post subject: View with new tests from last few days Reply with quote

Hello,

How to create a view that shows tests that have been added in the last 7 days
I used the "using expression" option:
('% CreatedTime%' getword 1)> = '% fvar_date_7_days_ago%'
"fvar_date_7_days_ago" - calculated date today minus 7 days in the format "yyyy-mm-dd"
Unfortunately, the view also shows tests from 7 days ago.

Where is the mistake, any ideas

Thank you in advance for your help
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12100
Location: USA

PostPosted: Tue Nov 05, 2019 3:09 am    Post subject: Reply with quote

There is extra space chars after %, better remove it
'% CreatedTime%'
'% fvar_date_7_days_ago

Such expression will be compared as 2 strings so result depends on Windows regional settings.
E.g.
yyyy/mm/dd: ('2019/10/20' >= '2019/10/13) will be compared as you need
dd/mm/yyyy: ('20/10/2019' >= '13/10/2019) will not works in the way you need because string like '20/10/2015' > 13/10/2019

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
cichockia



Joined: 19 Sep 2014
Posts: 31

PostPosted: Tue Nov 05, 2019 4:43 am    Post subject: Reply with quote

Hello,
Special characters added during copying, they are not present in the configuration, the condition looks like this:
('%CreatedTime%' getword 1) >= '%fvar_date_7_days_ago%'

The local date format is YYYY-MM-DD, so it seems that the comparison should work as expected, unfortunately it doesn't work.

I did the ping test and entered in the "Tune up Replay value" field:
('%CreatedTime%' getword 1) - '%fvar_date_7_days_ago%'
The result in the Reply field is:
('2019-11-05 11:30:17' getword 1) - '2019-10-29'
It seems that it should be OK and not a view still returns tests added a few years ago.

The cause was determined, it is about the scope of variables.
The condition works incorrectly for tests that are located in directories with "Use folder variables only"
So my variable %fvar_date_7_days_ago% needs to be mapped to global
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12100
Location: USA

PostPosted: Tue Nov 05, 2019 12:09 pm    Post subject: Reply with quote

Quote:
The condition works incorrectly for tests that are located in directories with "Use folder variables only"

Do you mean you have some sub-folders that do not inherit variables from parent and you did not specify variable for these sub-folders?
Then expression works correctly, because any date string starts with number, '0'>'%' so any_date>unresolved_variable, result=True, test fits expression

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index