pochonerd Posted August 31, 2006 Share Posted August 31, 2006 I have a database that at least 1 of 6 determined fields must have a value on it. For Example: Price 1, Price 2, Price 3, Price 4, Price 5 and Price 6. At least one of these fields must have a value, but NOT two of them together or more can have a value. Do I have to Validate each 'Number field' through 'options'? or should I use something more complicated? Appreciate your comments on this issue! Pochonerd! Quote Link to comment Share on other sites More sharing options...
AHunter3 Posted August 31, 2006 Share Posted August 31, 2006 a) Why does each record have six price-slots, of which only one is allowed to actually have a price? There must have been a purpose behind this, but I can't help but suspect that there's a better way of attaining it. b) Each field can have a validation formula consisting of the other 5 fields all being blank. That covers "only one can have a value". As far as "at least one of these fields must have a value", you have to ask yourself "must have a value in order for the user to be allowed to do WHAT?" No easy way of selecting six fields and making one of them (but not specifying which one) a required field, but you can require that not all six fields be blank as a validation formula on other fields, and as something you test for in scripts. c) I can't think of a good "c" clause so I'll just repeat "a" again: what in the world led to their being six fields for the same purpose only one of which is allowed to contain data? Don't you want to rethink that? Quote Link to comment Share on other sites More sharing options...
aaa Posted August 31, 2006 Share Posted August 31, 2006 Hi, guys! Now i tried such. I crearted one Calc field Sum=Abs(f1)+Abs(f2)+Abs(f3)+Abs(f5)+Abs(f6) Then each field f1,f2,... i validated by calculation Sum-Abs(f1)=0,Sum-Abs(f2)=0 and it seems works. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.