logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Contest logform. Filtering
vk4iu
#1 Posted : Thursday, October 30, 2014 8:21:01 PM(UTC)
VK4IU

Rank: Advanced Member

Groups: Moderator, Registered, Administrators
Posts: 404
Man
Location: Hodgleigh QLD

Thanks: 6 times
Was thanked: 77 time(s) in 68 post(s)
G'Day Dennis,

I am using the INSTANCE, DATA, and REPORTS directives.

For the global.instance_id="CONTESTS" I load the contest log forms using statements like Global.new_object("log_form", "logdata\logforms\_2014-10 Oceania_DX_SSB.LOGFORM"), all via a script in the UPDATES folder.

While developing my Contest Report, it became rather tedious to be always reapplying the appropriate log filter for each contest logform.

In the your Contest Report script, there is code that applies the filter to the log for reporting.
Quote:
set filter to trim(contest_id)==m.contest_id and ;
ttoc(begdate,1) <= DTOS(QSO_DATE)+TIME_ON and ;
qso_date <= enddate


How do I select the contest logform to apply the "contest filter" to the contest logform when I load it from a script in UPDATES?



PS: Wouldn't it be nice if there was a "default filter" in a logform SETUP that was applied every time that logform was loaded. How about a list of "previous filter expressions" saved in a drop down on the logform or the filter dialogue.

Peter VK4IU
You can help by posting images of any errors and including your Logic version.
Sponsor
Note: We receive a commission from Amazon when you purchase via this link. It does not affect your cost. Thank you!
WN4AZY
#2 Posted : Sunday, November 2, 2014 8:36:15 PM(UTC)
admin

Rank: Administration

Groups: Administrators, Beta Testers
Posts: 3,096
Man
Location: Auburn, GA

Thanks: 997 times
Was thanked: 497 time(s) in 412 post(s)
Hi Peter:

Sorry for the delay in getting back to you on this.

Sorry, I don't follow you.

When you run the contest report, it asks for the contest form for the contest you want to print. Are you asking how to bypass this step and hard-code the name of the contest form somehow?

Quote:
PS: Wouldn't it be nice if there was a "default filter" in a logform SETUP that was applied every time that logform was loaded. How about a list of "previous filter expressions" saved in a drop down on the logform or the filter dialogue.

Are you applying a filter to every contest screen you use for some reason?

The filter you set in the log form (using the Funnel button), if any, has no effect on the report BTW.

Tnx & 73,

Dennis WN4AZY
vk4iu
#3 Posted : Sunday, November 2, 2014 10:29:31 PM(UTC)
VK4IU

Rank: Advanced Member

Groups: Moderator, Registered, Administrators
Posts: 404
Man
Location: Hodgleigh QLD

Thanks: 6 times
Was thanked: 77 time(s) in 68 post(s)
G'Day,

I am talking about loading the logform when I open LOGic,

I open logic with many shortcuts that look similar to this ...


"C:\Program Files (x86)\LOGic\logic.exe" INSTANCE=CONTEST_TEST DATA=.\testdata REPORT=VK4IUReports


and in a PRG in the UPDATES folder I have some code like this that runs when LOGic loads ...


if global.instance_id="CONTEST_TEST"
Global.new_object("log_form", "logdata\logforms\2014-11 CQ-WW-DX-Debug.logform")
<apply filter to form here>
Global.new_object("log_form", "logdata\logforms\2014-11 CQWWCW.logform")
<apply filter to form here>
endif


I want to apply a filter immediately after any logform load in this, or similar code.

I want to do this for "development work" - mainly developing contest forms, and testing them by making QSOs. I usually have several logforms open with different filters to see what happens as I make test QSOs, with the Browse window sorted in various ways

If I do anything that closes all the logforms, take a back up, or re-index, exit LOGic, I have to load and apply the filters all over again.

A drop down list of filters would make life easier - NONE would be the normal mode, and if any were selected it would be applied on load of the logform.

Peter VK4IU
You can help by posting images of any errors and including your Logic version.
WN4AZY
#4 Posted : Monday, November 10, 2014 9:51:58 AM(UTC)
admin

Rank: Administration

Groups: Administrators, Beta Testers
Posts: 3,096
Man
Location: Auburn, GA

Thanks: 997 times
Was thanked: 497 time(s) in 412 post(s)
Ok, I understand now, thanks.

I am working on it. This is just more notes for me than anything at this point. You can go to tools/advanced/database commands and type

global.log_form_ref.setfilter("STATE='GA'")

for instance. Trying to figure out how to get a reference to your new log form. Just want to let you know I haven't forgotten!

73,

Dennis
WN4AZY
#5 Posted : Friday, November 14, 2014 9:25:33 AM(UTC)
admin

Rank: Administration

Groups: Administrators, Beta Testers
Posts: 3,096
Man
Location: Auburn, GA

Thanks: 997 times
Was thanked: 497 time(s) in 412 post(s)
The answer was right in front of me!

Let me know if any questions.

73,

Dennis WN4AZY

Quote:
global.setup_clock() && we need this or loading the log forms causes errors

Global.new_object("log_form_desktop", "logdata\logforms\userfields.logform")
global.log_form_ref.setfilter("STATE='GA'")

Global.new_object("log_form", "logdata\logforms\mini.logform")
global.log_form_ref.setfilter("STATE='FL'")
1 user thanked WN4AZY for this useful post.
vk4iu on 11/14/2014(UTC)
vk4iu
#6 Posted : Friday, November 14, 2014 5:39:14 PM(UTC)
VK4IU

Rank: Advanced Member

Groups: Moderator, Registered, Administrators
Posts: 404
Man
Location: Hodgleigh QLD

Thanks: 6 times
Was thanked: 77 time(s) in 68 post(s)
... fantastic!

Just what I need.

Peter VK4IU
You can help by posting images of any errors and including your Logic version.
vk4iu
#7 Posted : Saturday, November 15, 2014 7:06:18 PM(UTC)
VK4IU

Rank: Advanced Member

Groups: Moderator, Registered, Administrators
Posts: 404
Man
Location: Hodgleigh QLD

Thanks: 6 times
Was thanked: 77 time(s) in 68 post(s)
G'Day Dennis,

The filter code is working correctly.

However, when I use the code, another problem has been revealed, not related to setting the filter via code.

I have tested the following without using any code - manually loading logforms and setting filters on both forms. I was also able to demonstrate the problem in a "clean skin" copy of LOGic9 under Windows XP, and in a copy of LOGic 8 under Win 7.

You should be able to see the issue by doing the following ...

Load two logforms, and set filters on each logform. Check that the browse window on each form does what the filter defines - the browse window only showing the filtered records.

Now close ONE logform. The browse window of the OTHER logfrom now no longer reflects the defined filter of its associated logform - it shows ALL records in the log, despite the logform filter.

This may be related to another issue I reported some time ago. Attached is a small video of that previously reported issue.
File Attachment(s):
browse.mp4 (1,660kb) downloaded 55 time(s).
Peter VK4IU
You can help by posting images of any errors and including your Logic version.
WN4AZY
#8 Posted : Wednesday, November 19, 2014 10:36:41 AM(UTC)
admin

Rank: Administration

Groups: Administrators, Beta Testers
Posts: 3,096
Man
Location: Auburn, GA

Thanks: 997 times
Was thanked: 497 time(s) in 412 post(s)
I'll check this out. Thanks for your clear description of the problem.

Tnx & 73,

Dennis WN4AZY
Users browsing this topic
Guest (4)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.070 seconds.