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

Notification

Icon
Error

Help needed default field expression builder LOGic 9
W2EC
#1 Posted : Thursday, October 26, 2017 10:05:16 AM(UTC)
Rank: Member

Groups: Registered
Posts: 20
Location: Apalachin,NY

I'm trying to set up a LOG field default expression. I'm logging my MARS station activity and we don't identify specific frequency assignments over the air, instead we refer to channels, for example NECOS will tell all stations to change to D002. I want to set up a default list so that when I enter a CHANNEL into my log, it will also populate my FREQ with the actual frequency value. I have created a table called CHANNEL, with entries such as D001, D002, D003 etc. Using a LOG DEFAULT setup, I want my FREQ to be populated with the frequency associated with the corresponding CHANNEL list item. For example I would enter D002 into the CHANNEL field when creating that log entry, and I would like the FREQ value updated based on that CHANNEL entry when the log entry is created.

Basically I am trying to perform the following:

FREQ = 4.0 IF CHANNEL = "D001"
FREQ = 4.1 IF CHANNEL = "D002"
FREQ = 4.2 IF CHANNEL = "D003"

Using the DEAFULT FIELD builder, I am entering the following:

Field.........Expression
FREQ........IIF(LOG.CHANNEL=="D001",4.1)

When I click OK I get error: This is not a valid expression. Missing comma(,). Run expression builder?
Running the expression builder doesn't help me at all, not sure what it is I need to do to correct this.
My userfield for CHANNEL is defined as text, so I'm enclosing the list value in quotes "D001". The FREQ is the standard LOG FREQ value, F.

I've also tried:
FREQ IIF(LOG.CHANNEL=="D001",4.1,)
FREQ IIF(LOG.CHANNEL=="D001",4.1,0)
FREQ IIF((LOG.CHANNEL=="D001"),4.1,0)
FREQ IIF((LOG.CHANNEL)=="D001",4.1,0)

I can't figure out what comma is missing. Any help in figuring out the correct expression will be very much appreciated.
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 : Friday, October 27, 2017 2:52:50 PM(UTC)
admin

Rank: Administration

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

Thanks: 969 times
Was thanked: 484 time(s) in 399 post(s)
Ok, here's the expression:

ICASE(GETUSERFIELD("CHANNEL:")=="D001", 4.0, GETUSERFIELD("CHANNEL:")=="D002", 4.1, GETUSERFIELD("CHANNEL:")=="D003", 4.3, 0)

The extra spaces are just for clarity.

However, there are problems with using this feature to do this. Note from HELP in Log/Setup/Defaults that these defaults are set when you add a new QSO, enter the call, then exit from the call field with the {tab} key. The problem is that if you log the call first, the CHANNEL user-defined field will not be filled in yet.

A workaround is to return to the call field after entering the channel, and pressing {Tab}. You could also turn CARRY FORWARD FROM PREVIOUS QSO for the CHANNEL field. That way if you aren't QSYing a lot, the CHANNEL from the last QSO will be entered by default. Set this up by clicking the waiter man button on the log form.

The ideal thing to do is to interface your radio, and use the DEFAULTS feature to fill in the channel. There is an example of doing almost exactly this in Help for that tab. The example is filling out a network name. You would choose CHANNEL for the TO field. The expression would be

ICASE(BETWEEN(FREQ, 3.99, 4.01), "D001", BETWEEN(FREQ, 4.09, 4.11), "D002", BETWEEN(FREQ, 4.19, 4.21), "D003", "")

I didn't test this, but you get the idea. I left a little wiggle room for the freq.

Let me know if any questions.

Tnx & 73,

Dennis WN4AZY
W2EC
#3 Posted : Saturday, October 28, 2017 10:55:42 PM(UTC)
Rank: Member

Groups: Registered
Posts: 20
Location: Apalachin,NY

Thanks Dennis,

The GETUSERFIELD is the operation I was missing. Don't see that anywhere in the HELP. Also, I have too many rigs at several different locations to list them all and tether them to the log. Logging is done on paper and entered when back at the home station.

The way I use this for MARS is at the start of a net, I know what channel we are on, so I enter the channel first before starting to enter stations, beginning with the NECOS. If we switch channels at any time I just enter the new channel and start continuing the log with any station that checks in on that channel. I'm actually entering a list over a hundred channels for MARS, and I have not memorized the CHANNEL/FREQ combination for each. Having the log pull up the FREQ when I have identified the CHANNEL keeps me from having to consult a list.

Thanks for your help.

73
Paul W2EC
WN4AZY
#4 Posted : Monday, October 30, 2017 9:13:54 AM(UTC)
admin

Rank: Administration

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

Thanks: 969 times
Was thanked: 484 time(s) in 399 post(s)
GETUSERFIELD() is an abbreviated version of TAG_VAL(). It is documented in Help under Expressions and Functions. Just search for it and it will be hilighted.

Let me know if any questions.

Tnx & 73,

Dennis WN4AZY
W2EC
#5 Posted : Monday, October 30, 2017 1:01:11 PM(UTC)
Rank: Member

Groups: Registered
Posts: 20
Location: Apalachin,NY

Hi Dennis,

I need to make a list called CHANNEL containing "D001" thru "D100".

Using your ICASE(GETUSERFIELD("CHANNEL:")=="D001", 4.0, GETUSERFIELD("CHANNEL:")=="D002", 4.1, GETUSERFIELD("CHANNEL:")=="D003", 4.3, 0) worked fine for me.

However, I actually have 100 entries in my CHANNEL list so need to figure out a way to loop thru the entire CHANNEL list searching for a match so I can populate the FREQ field with the frequency identified by that CHANNEL value. Since the line entry is limited to 254 characters, there is no way I can see to create an expression to access all 100 entries. Is there such a capability to perform an if-then-else type loop?

I also read about a dropdown list, I was thinking if I could have such a list assigned for my CHANNEL list, I could just use the dropdown, select the CHANNEL from it and populate the FREQ with the frequency associated with that CHANNEL. The problem is I haven't been able to actually create my CHANNEL userfield as a dropdown list. Is there some option I am supposed to be selecting to make this happen?

73,
Paul W2EC
WN4AZY
#6 Posted : Saturday, November 4, 2017 7:42:46 PM(UTC)
admin

Rank: Administration

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

Thanks: 969 times
Was thanked: 484 time(s) in 399 post(s)
Just bumping this so I don't forget.
WN4AZY
#7 Posted : Wednesday, November 8, 2017 2:39:02 PM(UTC)
admin

Rank: Administration

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

Thanks: 969 times
Was thanked: 484 time(s) in 399 post(s)
Ok, as per this post, there is not any to do what you suggest.
http://www.hosenose.com/...-list-use.aspx#post7254

However, here is an idea. Could the freq be derived from the description using a formula? Are the channels evenly spaced?

Tnx & 73,
Dennis WN4AZY
WN4AZY
#8 Posted : Thursday, November 16, 2017 11:22:25 PM(UTC)
admin

Rank: Administration

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

Thanks: 969 times
Was thanked: 484 time(s) in 399 post(s)
Ok, get the 9.1.24 update. Here is the new expression that will copy the freq from the DESCR field of the lists table to the FREQ field in Defaults.

VAL(LOGICDATA.LISTS("CHANNEL", GETUSERFIELD("CHANNEL:")).DESCR)

I want to hook something similar up for Radio Memories. Are you using those?

Tnx & 73,

Dennis WN4AZY
W2EC
#9 Posted : Friday, November 17, 2017 10:52:16 AM(UTC)
Rank: Member

Groups: Registered
Posts: 20
Location: Apalachin,NY

Thanks Dennis, I will update and try this when I get home this evening. All the channels are in radio memories, I am using two different radios, an Icom F8101E and a Kenwood TK-90, both dedicated to MARS operation.

73,
Paul W2EC
W2EC
#10 Posted : Friday, November 17, 2017 2:16:40 PM(UTC)
Rank: Member

Groups: Registered
Posts: 20
Location: Apalachin,NY

Expired two months ago so can't get the update to try. I renewed but looks like it will take several days for the renewal process so won't be able to try until then.

73,
Paul W2EC
W2EC
#11 Posted : Sunday, November 19, 2017 10:21:55 AM(UTC)
Rank: Member

Groups: Registered
Posts: 20
Location: Apalachin,NY

Still waiting for my LOGic update renewal so can't move to 9.1.24. All I've been able to install was 9.1.22, the last version that was covered by my subscription.

However the 9.1.22 update is failing. After install and launch of the 9.1.22 updated version I get the following error message:

Error 1429 "OLE IDispatch exception code 0 from EntityFramework: An error occurred while executing the command definition. See the inner exception for details..." has occurred in program PREFIXLOOKUPSETUP, line 41. Attempt to continue? Yes / No

I have tried the Yes selection and things seem to work after that. But this error message appears every time I restart LOGic 9.1.22 so I'm afraid to log anything in case something is messing up that I won't be aware of until some time in the future.

73,
Paul W2EC
WN4AZY
#12 Posted : Thursday, November 23, 2017 8:33:50 AM(UTC)
admin

Rank: Administration

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

Thanks: 969 times
Was thanked: 484 time(s) in 399 post(s)
It was emailed to you on the 20th. If you haven't found it yet, check your spam folder. I'll also send you a private message with the details.

DH
WN4AZY
#13 Posted : Tuesday, December 19, 2017 10:09:55 AM(UTC)
admin

Rank: Administration

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

Thanks: 969 times
Was thanked: 484 time(s) in 399 post(s)
I uploaded 9.1.25 last night. You can use it to get the freq from the Radio Memories file. Assuming the category is MARS and the channel is in the COMMENT field (you can't put D001 in the channel field of the radio memories since they are numeric only), this would be the expression:

LOGICDATA.RADIOMEMBYCOMMENT("MARS", GETUSERFIELD("CHANNEL:")).FREQ)

73,

DH
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.049 seconds.