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

Notification

Icon
Error

Awards - Calculated field
vk4iu
#1 Posted : Wednesday, April 24, 2013 10:15:15 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,

There are 910 JCC values for JA, 622 for JCG. There are 57,821 entries for SOTA!

Clearly I am kidding myself that I can work all of them! Hence the "progress list" for awards against these lists are fairly meaningless.

So, I setup some "awards" to track my progress against the various sub-parts of these lists.

I checked how the CQFIELD award detailed in the Help was setup. It works a treat - just what I expected.

With respect to JCG for example, I created a list of values for SAITAMA prefecture in JA, and a user-field called JCG-SAITA, and set the "calculated-field" for the award to "GETUSERFIELD("JCG:","C")" and the filter to "BETWEEN(TAG_VAL("JCG:",USERFIELDS,"C"),'13001','13999')".

Clearly there is no "paper" to apply for, for such an "award", so I ticked the boxes that eQSL and LotW is OK for this "fake award".

I then ran "Update Awards Progress", and checked the Progress List.

There are 9 JCG values for JCG-SAITAMA in the list, one of which is deleted. I know there are 5 QSOs in my log for JCGs in Saitama, all confirmed with paper QSLs.

To my dissapointment, the "Progress List" does not show the data correctly.

JCG calculated field - fake award

I have tried no filter, and the filter above is the actual filter from my JA log form where I checked that there were 5 QSOs in the log, all confirmed. The filter validates and counts 5 QSOs - as I expect.

What have I missed? The only difference I see is that CQFIELD is not based on a "user-field".

Peter VK4IU

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 : Monday, April 29, 2013 7:14:38 PM(UTC)
admin

Rank: Administration

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

Thanks: 998 times
Was thanked: 497 time(s) in 412 post(s)
Ok, I found the problem. It seems that GETUSERFIELD() does not work. You have to use TAG_VAL().

Also, for simplicity's sake, I used Integer. You could run into problems if the range beginning and end changed number of digits--for example 900 - 1100.

Tnx & 73,

Dennis WN4AZY
File Attachment(s):
capture.jpg (30kb) downloaded 42 time(s).
vk4iu
#3 Posted : Monday, April 29, 2013 8:02:37 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,

Thanks Dennis. Works for me too using TAG_VAL and Integer values.

Will you be updating the code to allow character fields and the use of GETUSERFIELD?

For me: Priority is Medium.

Peter VK4IU
Peter VK4IU
You can help by posting images of any errors and including your Logic version.
WN4AZY
#4 Posted : Friday, May 3, 2013 1:51:55 PM(UTC)
admin

Rank: Administration

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

Thanks: 998 times
Was thanked: 497 time(s) in 412 post(s)
This has been fixed with the update I posted today.

Be sure to change both places where you use tag_val() where you are at it. That said, both ways work exactly the same way, so it is fine to leave it hihi.

I don't think there ever was any problem with character user-defined fields as calculated fields. I just did them as numbers in my test because the underlying field is numeric. I suspect that character would work even in this case.

Tnx & 73,

Dennis WN4AZY
vk4iu
#5 Posted : Sunday, February 16, 2014 6:22:27 AM(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,

After a few failed attempts, I have finally completed the work on Awards where there are literally thousands of values. I want to create smaller goals for my operating.

I chose as a first attempt the JCC award - separating out the cities by Prefecture. I used JCC as the prototype because it was big enough, but small enough to manage easily as my first attempt.

There are probably a few ways to do this by simply using the Award reports. Or perhaps by truncating the full award list. I wanted the complete data set for any award, so I did the work this way.

The objective is, for an Award where there are thousands of values such as US County, ARLHS, RDA, SOTA, WAB JCC, JCG, separate out as operating sub-goals parts of the whole Award by using a calculated field similar to Dennis's example for CQFIELD here

The last thing I wanted to do was to create another user field that has to be completed on a log form during the QSLing process.

There has to be a user field for every Award. There may, or may not be, a list associated with that field in the award Lists database. The list is not required, but only if there is a list of known values, is it possible to know what is "unworked".

So we need to create a user field, but we do not have to place it on any log forms, nor enter any data into the field in a QSO. Logic will "calculate" the data when we use Update Awards Progress, and store all the necessary data for the Award reports in the Lists database.

The tricky part is getting the expression correct for the calculation to be performed during Update Awards Processing to extract the award value for this "calculated award".

I want to track my progress working JA8 and the cities on the island of Hokaido in Japan. I know that the JCC list stores the values for all of Japan with the cities of Hokaido numbered 0101 to 0199.

So I create a user field "JCC_HOKAID". Field names must be 10 chars or less. I mark it as a "character" field. I want to know what cities on Hokaido I have yet to work, so I must create a list in the Lists database. See below for how I did that.

On the Awards panel, I check that I want to track this field as an award. In the filter field, I filter for DXCC='JA'. The filter makes the process go faster - the Update Awards Progress need not bother doing calculations on QSOs that cannot possibly have any valid JCC data.

JCC data is stored in the USERFIELDS field of the QSOs and is in character form. In the calculated field for JCC_HOKAID I entered:

IIF(BETWEEN(VAL(GETUSERFIELD("JCC:")),100,199),GETUSERFIELD("JCC:"),"")

... which is interpreted as ... retrieve user field JCC from the QSO, convert the value to an integer, if the value is between 100 and 199, return the value in the user field JCC as the value for this calculated award, otherwise use no value at all, ignoring this QSO.

Creating the list for Hokaido can be done in a variety of ways. If anyone wants the lists for all 47 JA Prefectures that you can import with the Lists dialogue - just ask. I created them by using Tools, Advanced Database commands using ...
use lists
copy to jcc.txt for field_name = "JCC" delimited with TAB

Using a normal text editor, I then edited the JCC field name for each list item for each prefecture to JCC_<prefecture>, limiting the name to 10 characters. From this ...
"JCC"	"0101"	"SAPPORO (HOKKAIDO)"	""	F
"JCC" "0102" "ASAHIKAWA (HOKKAIDO)" "" F
"JCC" "0103" "OTARU (HOKKAIDO)" "" F
"JCC" "0104" "HAKODATE (HOKKAIDO)" "" F
... to this ...
"JCC_HOKAIDO"	"0101"	"SAPPORO (HOKKAIDO)"	""	F
"JCC_HOKAIDO" "0102" "ASAHIKAWA (HOKKAIDO)" "" F
"JCC_HOKAIDO" "0103" "OTARU (HOKKAIDO)" "" F
"JCC_HOKAIDO" "0104" "HAKODATE (HOKKAIDO)" "" F
I then retrieved the list with ...
append from jcc.txt delimited with TAB
...creating all 47 lists.

With all the pieces in place, I ran Update Awards Progress. And, as the clown said "hey presto!" I can now use all the Award reports, select JCC_HOKAID, and see my progress for JA8 cities by band, by mode, by band and mode.

Now for Summits on the Air, IOTA, Lighthouses, Counties.

What multi thousand Award would anyone like me to work on?



Peter VK4IU
You can help by posting images of any errors and including your Logic version.
Users browsing this topic
Guest (2)
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.236 seconds.