You are here

Full name captured into 'Name' field from QRZ.com

2 posts / 0 new
Last post
vk2on
Full name captured into 'Name' field from QRZ.com

I am a new user to CQRLOG and still deciding whether to stay, or run back to the safety of Windows and HRD. I'd like to stay...but there are some challenges.

Seems there is a query behind the operator name field which truncates the XML output of QRZ.com to only reflect 'firstname' rather than firstname lastname. That wouldn't necessarily be a big problem only that the rest of my imported HRD log is firstname lastname, but more importantly, those that only have their initials in QRZ, you don't even get the firstname. Is there a way to change this to not truncate the field and put the whole name in?

Many thanks
Aaron
VK2ON

oh1kh
Full name captured into 'Name' field from QRZ.com

Hi Aaron!

Well. Normally, I think, only first name (or nick name) is used in ham world. Even more often our name is just own callsign.
If someone asks: Do you know John Smith, he is a Ham operator too? Answer usually is: Sorry I do not know him.
But if question is placed: Do you know John VK1ABCD? Answer from same guy may be: Yes!

Cqrlog fetches only tag "fname" (first name) from Qrz data. And if the first name has more parts than one separated with space it will take just the first part. And what is get is converted to low case letters and then the first letter is converted back to upcase.

Great part of this job is that it is open source. You can change it by your needs.
This "fname" is found from file dUtils.pas
Starting line 3090 in latest GitHub version:


nick := GetTagValue(m.Text, '<fname>');
if Pos(' ', nick) > 0 then
nick := copy(nick, 1, Pos(' ', nick) - 1);
if Length(nick) > 0 then
begin
nick := LowerCase(nick);
nick[1] := upCase(nick[1]);
end;

Trying lines after listed above could be the start of modification:

nick := nick+' '+ GetTagValue(m.Text, '<name>');
trim(nick); // in case there is an empty "name" tag remove added space

Also commenting out line 2 and 3 from first part:

// if Pos(' ', nick) > 0 then
// nick := copy(nick, 1, Pos(' ', nick) - 1);

Might be worth of try. Then "fname" having several parts is not cut.
Just remember that database column "name" can hold max 40 letters.

That is something you can't do with HRD !

--
Saku
OH1KH