The files are ORDER and ORDER.LINE, (don’t get me started on that…) did not include the Invoice Date in the detail lines.
However we need to select specific order lines using the Invoice Date.
The application is built in System Builder, which adds another layer of complexity to the problem.
Now that I know what the problem is, I have a couple of ideas how to work around the problem. I have not had the opportunity to try them but hopefully will in the coming few days.
I appreciate your interest in helping me resolve the problem.
Thanks again.
Information Technology Systems Inc.
Original Message:
Sent: 7/30/2024 12:44:00 PM
From: Henry Unger
Subject: RE: UniData index is not updating when records change or are added to the file being indexed.
Bob,
If this were UnIVerse, Indexing derived fields per se should not be a problem. What is guaranteed to cause a problem is an index whose expression, either directly or indirectly, contains a TRANS(), or ICONV() or OCONV() with a Tfile, or one that is temporally-dependent, e.g., an index whose expression includes DATE(), TIME(), or NOW().
That being said, there are several techniques that can be employed to avoid requiring a trigger-based index, for example, if you have a header file and a detail file, where the header has the date, you don't want to index the detail file on the date of the header file, rather, use the index of the header file from the detail file or vice versa when querying it.
If you provide more details about the dependencies and the problem you are trying to solve, perhaps I or others could point you in a direction that would minimize your effort in solving the problem.
Henry
------------------------------
Henry Unger
President
Hitech Systems Inc
Encino CA US
------------------------------
Original Message:
Sent: 07-30-2024 08:45
From: Bob Lisle
Subject: UniData index is not updating when records change or are added to the file being indexed.
David,
The problem is the dictionary is a derived field. There are a number of indexes in the application with the same problem, that were assumed to be working correctly, that are in fact not working.
I'm going to look into adding an after trigger to update the index.
Thanks to all who responded. It is most appreciated.
Bob
------------------------------
Bob Lisle
President
Information Technology Systems
Dallas TX US
Original Message:
Sent: 07-30-2024 08:22
From: John Jenkins
Subject: UniData index is not updating when records change or are added to the file being indexed.
David,
Good catch - Bob, please post the dictionary entry that is being indexed and any related dictionary or subroutine details if any.
Also check if the dsta is single-valued, multi-valued or multi-subvalued.
Regards
JJ
------------------------------
John Jenkins
Thame, Oxfordshire
Original Message:
Sent: 07-29-2024 17:59
From: David Green
Subject: UniData index is not updating when records change or are added to the file being indexed.
Is the Invoice Date on the file an I-Descriptor or Virtual Attribute? Indexes won't update when data changes in other files.
Your option would be to add an after trigger to update the index.
------------------------------
David Green
Computer Programmer
Rocket Forum Shared Account
Original Message:
Sent: 07-27-2024 10:51
From: Bob Lisle
Subject: UniData index is not updating when records change or are added to the file being indexed.
I am indexing a 21,000,000 record file on the invoice date. It is a single value field, and when I build the index it works correctly based on the records in the file at the time of the build. After that, new records or changed records are NOT added to the index.
Is there a setting related to indexing that must be set to auto update the index?
I have read all the UniData documentation on indexing that I can find.
I have been using indexes in other versions of Pick for decades and this is the first time I have hit this problem.
------------------------------
Bob Lisle
President
Information Technology Systems
Dallas TX US
------------------------------
</mailto:bob@itspick.com>