8 hours ago8 hr I have a script that has a FIND that's not working.I have a variable $$F1034 that contains a NUMBER, such as 8603, from table A.(I'm looping table A through several records, each with their own F1034, some may be duplicate F1034's)I do a FIND on table B, looking for field TTL_FILE::F1034 = $$F1034.If not found, add a record and populate fields, and use $$F1034 to populate field F1034 in TTL_FILE (which is also a number).After adding a record, I commit the data in TTL_FILE.No matter what I've done, I cannot get the FIND to locate the previously entered/saved/committed record with F1034 if there's a duplicate (I WANT to find the duplicate and update some numeric fields)...This is my code that is not working:0I've tried at least 10 other variations of code... swapped the "IF..." to If[ Get ( FoundCount ) = 0]... and reversed the code... I've tried changing the field to a TEXT field in both tables...I've never had a FIND not work like this one is, and I'm pulling what's left of my hair out.Anyone on here have suggestions on why it's not finding $$F1034 in TTL_FILE?I've written a workaround for this, where I LOOP through the TTL_FILE and update the record if found, or add it if NOT found, but that's REALLY not what should be done, as it's much slower.Thanks.
8 hours ago8 hr 27 minutes ago, RCrosier said:Anyone on here have suggestions on why it's not finding $$F1034 in TTL_FILE?It's hard to diagnose a problem without being able to reproduce it. If you are sure the search value exists, try rebuilding the field's index. Also check the file for possible corruption. But these are no more than wild guesses. It would be much more productive if you could post a simple file demonstrating the problem.
7 hours ago7 hr Author 4 minutes ago, comment said:It's hard to diagnose a problem without being able to reproduce it. If you are sure the search value exists, try rebuilding the field's index. Also check the file for possible corruption. But these are no more than wild guesses. It would be much more productive if you could post a simple file demonstrating the problem.Thanks. I tried to find a "rebuild indexes" command, but could not... how do I do that manually or via script?Oh, and I CAN reproduce it, over and over, but stepping through the code, it just makes NO sense to me why it's not working... Edited 7 hours ago7 hr by RCrosier
7 hours ago7 hr 41 minutes ago, RCrosier said:I tried to find a "rebuild indexes" command, but could not...In Manage Database > Fields > Options set the field's indexing to None and check the 'Automatically create indexes as needed' option. Click OK then exit Manage Database by clicking OK again.47 minutes ago, RCrosier said:I CAN reproduce it, over and overI am sure you can, but I cannot. That means all I can do here is guess, which is something I do not like to do. Edited 6 hours ago6 hr by comment
6 hours ago6 hr Author Just now, RCrosier said:Thanks. I tried to find a "rebuild indexes" command, but could not... how do I do that manually or via script?53 minutes ago, comment said:In Manage Database > Fields > Options set the field's indexing to None and check the 'Automatically create indexes as needed' option. Click OK then exit Manage Database by clicking OK again.I am sure you can, but I cannot. That means that all I can do here is guess, which is something I do not like to do.Haha, sorry, I misunderstood your comment...Changing the indexing did not make any difference... Thanks for the suggestion though.
Create an account or sign in to comment