Hey Paul, Happy Holidays! Glad to see you about. Dave - Paul has it on the money of course, what I would add is that if you require than the field have a response (not blank) then code the field itself as a ::M field so that the record can't be saved without an entry.
Don *Don FriedmanProfessionalRecords.Com LLCPRS Data Systems* *205 S Main StreetPittsburgh, PA 152151-800-PRS-FILE 412-784-1615 Fax* *412-400-3881 Cell/Text* On Thu, Dec 22, 2016 at 9:00 AM, <[email protected]> wrote: > Hi Dave: > > You would use a formula on your field like the following (assumes your U1 > field is P1F6): > > if P1F6 = "Y" then "Y" > else if P1F6 = "N" then "N" > else "" > endif endif > > Set validation to "Automatically computed at any change and when record is > saved". > > This won't allow any entry except Y or N to be saved. > > Incidentally, be sure to find and download Ralph Alvy's book "Mastering > DataPerfect" if you haven't already done so. It's a great guide to fully > using DP. > > Paul Durban > > > > -------- Original Message -------- > Subject: [Dataperf] Implementing a Y/N field (or: constraining a U1 field) > Date: 2016-12-22 08:39 > From: Dave Britten <[email protected]> > To: DataPerfect Mailing List <[email protected]> > > Howdy folks, > > It seems like this ought to be a simple thing, but I'm just not quite > getting there. I need to have a few fields that accept either "Y" or "N". > U1 fields are the obvious choice. How can I constrain the user's input to > only "Y" or "N"? Setting range validation on the field obviously won't do > it, since you can't give a list of discontinuous values to validate against. > > I tried adding a calculated field next to it that translates the "Y" and > "N" to 1 and 0, and defaults to 2 for anything else, then putting 0-1 range > validation on that. It sort of works if that surrogate field isn't hidden, > but if it's hidden, the validation doesn't seem to run. > > Is the simplest way to do this by creating a panel that holds the "Y" and > "N" values, and using that as a target for no-create data links in the > entry forms? I could swear I read something in passing about doing this > kind of validation with field formulas and range validation, but I'm not > having any success finding it now. > > -Dave Britten > _______________________________________________ > Dataperf mailing list > [email protected] > http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf > _______________________________________________ > Dataperf mailing list > [email protected] > http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf >
_______________________________________________ Dataperf mailing list [email protected] http://lists.dataperfect.nl/cgi-bin/mailman/listinfo/dataperf
