Hi,In a progress .p file, we have a logic using can-find function like below:can-find(tablename where field1 = xxx and field2 = xxx)Issue is this can-find always return false since yesterday, it works fine (return true) for a long time.I tried to add the first keyword befor the table name, then it works ok (return true).Question is why it works after added the "first" keyword? Why it works before but not today? What happens may cause this issu?Thank you!
When you don't specify the FIRST opiton, it's a CAN-FIND UNIQUE.
That is supposed to fail, when there is a second record matching the criteria. I guess that's happening.
You should never use the FIND without FIRST (or LAST) when there is no UNIQUE index supporting the search. The AVM needs to search for the FIRST record and then also for a second record, to know if there's only a single record. That's a performance issue.
Hi Mike,Thank you for your fast reply.That table has a primary unique index and the can-find use it also.Any other reason may cause this issue?Btw, only one record meets the searching criterion.Thank you.
Hi Mike,Thank you. we found the reason it's the index issue.