[Solved] Override a TEST concerning entry of data once ...

Discuss the database features
Post Reply
dreamquartz
Posts: 881
Joined: Mon May 30, 2011 4:02 am

[Solved] Override a TEST concerning entry of data once ...

Post by dreamquartz »

Hi All,
While working on a TRIGGER, I noticed that there might be a need for something to "override" a TEST concerning entry of data once a while.

The DateBase I am working with right now has a long history of incomplete entries, and specifically for Persons.
There might be just an entry of the Lastname and the GivenName, and not a DOB.

It is a situation that can still occur where a Person entered, is a ContactPerson to a Company. In this case there is no need for a DOB.
However, there is a chance that that particular Person gets an elevated status where the entry of the DOB is required.

To be as accurate as possible the Person table tPerson is UNIQUE on Lastname, GivenName and DateOfBirth, but this means that when:
a. a Person is entered with the same Lastname and GivenName and no DOB, or
b. a Person is entered with the same Lastname and GivenName and a DOB,
a new entry will be accepted, creating a potential copy of and existing entry in the DataBase.

What I would like to accomplish is some kind of notification that there is already a Person with the same Lastname and GivenName, so that that entry can be verified if it is the same Person or not, based on other existing information, which could be a PhoneNumber or EmailAddress.

If it turns out to be the same Person, modifications to the existing information can made, or if it turns out it is someone else, the Person should be entered.

The moment that the existing entry has been verified, the User should be able "override" the notification and being able to continue with dataentry.

Any thought?

Dream
Last edited by dreamquartz on Wed Jun 28, 2017 10:29 pm, edited 1 time in total.
LO 7.x, HSQLDB 2.7.x & Ubuntu 22.04 LTS.
eremmel
Posts: 1080
Joined: Tue Dec 30, 2008 1:15 am

Re: Override a TEST concerning entry of data once a while

Post by eremmel »

Assume that there is a table for each user that is using the infrastructure.
Assume that a user is know to the database and there is a function you can obtain current user.
1 User runs into 'duplicate' issue (due to trigger)
2 User validates that warning should be overruled.
3 User flags override next action in his profile
4 Trigger sees user's override flag and does not block AND it clears the override flag.
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
dreamquartz
Posts: 881
Joined: Mon May 30, 2011 4:02 am

Re: Override a TEST concerning entry of data once a while

Post by dreamquartz »

eremmel wrote:Assume that there is a table for each user that is using the infrastructure.
Assume that a user is know to the database and there is a function you can obtain current user.
1 User runs into 'duplicate' issue (due to trigger)
2 User validates that warning should be overruled.
3 User flags override next action in his profile
4 Trigger sees user's override flag and does not block AND it clears the override flag.
That makes perfect sense.

Dream
LO 7.x, HSQLDB 2.7.x & Ubuntu 22.04 LTS.
dreamquartz
Posts: 881
Joined: Mon May 30, 2011 4:02 am

Re: Override a TEST concerning entry of data once a while

Post by dreamquartz »

Realizing it might be slightly more complicated. What to do when there is a 3rd Name?
Therefore there must be some kind of Reset.
The moment that a Check has been overruled, the newly entered, but also the existing info must be available for a new Check.

Dream
LO 7.x, HSQLDB 2.7.x & Ubuntu 22.04 LTS.
dreamquartz
Posts: 881
Joined: Mon May 30, 2011 4:02 am

Re: Override a TEST concerning entry of data once a while

Post by dreamquartz »

eremmel wrote:Assume that there is a table for each user that is using the infrastructure.
Assume that a user is know to the database and there is a function you can obtain current user.
1 User runs into 'duplicate' issue (due to trigger)
2 User validates that warning should be overruled.
3 User flags override next action in his profile
4 Trigger sees user's override flag and does not block AND it clears the override flag.
Is there flag function under SQL? I can't seem to find anything remotely similar like that.

Dream
LO 7.x, HSQLDB 2.7.x & Ubuntu 22.04 LTS.
eremmel
Posts: 1080
Joined: Tue Dec 30, 2008 1:15 am

Re: Override a TEST concerning entry of data once a while

Post by eremmel »

dreamquartz wrote:
Is there flag function under SQL? I can't seem to find anything remotely similar like that.

Dream
What about a field of boolean type or any other type that is linked with a listbox to a table having yes/no
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
dreamquartz
Posts: 881
Joined: Mon May 30, 2011 4:02 am

Re: Override a TEST concerning entry of data once a while

Post by dreamquartz »

That's what I'm thinking too, but you mentioned 'flag' specifically.
I did research that, but nothing came up under SQL. I would like to be able to have a RESET function, because of the potential of having to check again against a new entry. There is always a chance that a entry happens again.
I haven't figured out the RESET part yet.

I am looking at duplicate entries in the database already for Surname and GivenName, and they do exist in at least 2 cases 3 times.
They are different people, but Surname and GivenName is the same.

As indicated, there is also 'historical' and incomplete entries, where there can be info, like a phone number, that can help to determine that it is the same person.
However all the info that could help to determine if this is or is not the same person, is stored in different tables.

Dream
LO 7.x, HSQLDB 2.7.x & Ubuntu 22.04 LTS.
eremmel
Posts: 1080
Joined: Tue Dec 30, 2008 1:15 am

Re: Override a TEST concerning entry of data once a while

Post by eremmel »

These type of question (See also your other thread) are no longer about AOO Base questions, but about application engineering skills. When you can not find a solution when I pin point in a direction, the only way for you to get a solution is to spell is it out for you with SQL, Macro's and example databases. It looks to me that you lag fundamental software engineering skills to make such complex projects (or it is the language).
E.g. calling something a flag is just in general a property that can be in two states, quite common but also dangerous.

Other volunteers can take it over from here, but this just takes too much time; when helping at this level I'm expecting some learning curve, but ...
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
dreamquartz
Posts: 881
Joined: Mon May 30, 2011 4:02 am

Re: Override a TEST concerning entry of data once a while

Post by dreamquartz »

eremmel wrote:These type of question (See also your other thread) are no longer about AOO Base questions, but about application engineering skills. When you can not find a solution when I pin point in a direction, the only way for you to get a solution is to spell is it out for you with SQL, Macro's and example databases. It looks to me that you lag fundamental software engineering skills to make such complex projects (or it is the language).
E.g. calling something a flag is just in general a property that can be in two states, quite common but also dangerous.

Other volunteers can take it over from here, but this just takes too much time; when helping at this level I'm expecting some learning curve, but ...
K.
I understand.
Little about my background.
Many years of experience in programming in Algol, Fortran, Basic, Pascal and UNIX (@ machine level), and as QAQC Manager @ large software development and implementation projects around the world including @ KPN.
Terms like "Flags" are used regularly at the design stage for those languages.

SQL is very limited in it's use and abilities. Expecting more than is available for coding.

Dream
LO 7.x, HSQLDB 2.7.x & Ubuntu 22.04 LTS.
Post Reply