LingoJango Posted April 30, 2008 Share Posted April 30, 2008 Is there any way to find all the records that have values which do not meet their validation criteria, even if the criteria have been overridden in the past? And an ancillary question -- is there any reason for FM not to allow me to redefine a specific field to require unique values, other than the (possible but undetected) existence of non-unique values in the field? Thanks! Link to comment Share on other sites More sharing options...
Maarten Witberg Posted April 30, 2008 Share Posted April 30, 2008 can you give an example of the validation? For instance if the validation is a range between two values, do a find for the range outside them. Link to comment Share on other sites More sharing options...
Maarten Witberg Posted April 30, 2008 Share Posted April 30, 2008 oh you mean as a direct find action? not that I know of Link to comment Share on other sites More sharing options...
LingoJango Posted April 30, 2008 Author Share Posted April 30, 2008 Hi, kjoe, I can usually work out the calc needed to check whether an individual field is valid, but I was wondering whether I might find a scripted way to identify records with any overriden value in any field. And do you have any ideas why FM won't let me set one specific (primary key!) field to require unique values? I forgot to do that earlier on and now it just won't let me - I'll set it, but as soon as I ok the field definition it gets reset. Link to comment Share on other sites More sharing options...
LingoJango Posted April 30, 2008 Author Share Posted April 30, 2008 Privilege set is Full Access. Link to comment Share on other sites More sharing options...
Maarten Witberg Posted April 30, 2008 Share Posted April 30, 2008 Hi Lingojango, What you can do is this: set error capture [ on ] go to record [ first ] loop set field [ TheTable::FieldToCheck ; TheTable::FieldToCheck ] commit records / requests [ no dialog ; [b]DO NOT [/b]SKIP VALIDATION ] if [ get ( lasterror ) ] set field [ TheTable::FlagField ; 1 ] commit records / requests [ no dialog ; SKIP VALIDATION ] end if Go to record [ next; exit after last ] end loop Enter find mode set field [ TheTable::FLagField ; 1 ] perform find [ no dialog ] Now you should have a set of records that have overridden field validations. [Insert the usual lecture about making a backup before proceeding here] I'm sorry but I can't reproduce your problem for the unique requirement. Link to comment Share on other sites More sharing options...
LingoJango Posted April 30, 2008 Author Share Posted April 30, 2008 Thanks, that's great. Link to comment Share on other sites More sharing options...
Recommended Posts