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

Notification

Icon
Error

Massive data change command
IK0CHU
#1 Posted : Monday, June 21, 2021 2:34:54 PM(UTC)
RedBaron

Rank: Advanced Member

Groups: Registered
Posts: 365
Man
Location: Viterbo, VT - ITALY

Thanks: 57 times
Was thanked: 85 time(s) in 79 post(s)

Hello everybody.
I launch a call for help and hope someone can help me.
I explain the problem.
I have created a new field called QOB acronym of Qsl Official Bureau and relative archive to be able to print my QSLs for the Bureau without having to check them after they are printed.
For example, with the procedure of massive archive changes, I added the LU value in the QOB field to the DXCC LU. Similarly for DXCC GW QOB = G DXCC GM QOB = G etc etc.
With the same criterion I elaborated the American CALLS proposing the call area as a filter element. Example DXCC K_, call contains 1, fill in the QOB field with W1 etc etc.
The problem arises with the call area 4 where I must also indicate the prefix with one letter and the prefix with two letters with the exclusion of KG4 and KP4.
Which command should I give to differentiate x4 with xx4 ????
I cannot find which wildcards to use, as long as this operation is possible.
Thanks to anyone who can give me a solution on the script to insert in the replace into massive change database command.
73's de Mauro IKØCHU
***
File Attachment(s):
ScreenShot1056.jpg (94kb) downloaded 48 time(s).
IKØCHU Mauro
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 : Tuesday, June 22, 2021 2:07:05 PM(UTC)
admin

Rank: Administration

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

Thanks: 997 times
Was thanked: 495 time(s) in 410 post(s)
Quote:
Which command should I give to differentiate x4 with xx4 ????

There is a regular expression engine in .net that I could expose easily enough. But they are complicated.

This would probably be the easiest:

x4:
DXCC = "K " and at(CALL, "4")=2
(the 4 is in the second position.)

xx4:
DXCC = "K " and at(CALL, "4")=3

By the way, you could put these statements all in a .prg file in the UTIL folder to easily update the new QSOs at any time.

use log

replace userfields with tag_edit(userfields, "QOB", "W1") for NOT "QOB:" $ USERFIELDS and DXCC="K " and left(call,2)="W1"

replace userfields with tag_edit(userfields, "QOB", "W2") for NOT "QOB:" $ USERFIELDS and DXCC="K " and left(call,2)="W2"

...

replace userfields with tag_edit(userfields, "QOB", "KP4") for NOT "QOB:" $ USERFIELDS and DXCC="KP4 "

replace userfields with tag_edit(userfields, "QOB", "x4") for NOT "QOB:" $ USERFIELDS and DXCC="K " and at(CALL, "4")=2

replace userfields with tag_edit(userfields, "QOB", "xx4") for NOT "QOB:" $ USERFIELDS and DXCC="K " and at(CALL, "4")=3

...

Note the NOT "QOB:" $ USERFIELDS. It keeps a command from overwriting existing results. That way if you have commands that could possible conflict, put the one that takes precedence first.

Let me know if any questions.

Tnx/73,

DH
1 user thanked WN4AZY for this useful post.
IK0CHU on 6/22/2021(UTC)
Users browsing this topic
Guest
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.023 seconds.