Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Find records with non-valid values


LingoJango

Recommended Posts

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

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

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

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



×
×
  • Create New...

Important Information

Terms of Use