Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Allowing input into a field ONLY if certain requirements are met

Status
Not open for further replies.

tbyrd1969

Technical User
Aug 22, 2004
12
I am trying to create a field that will only allow input if previous field values allow it.

For example: If Field A >=10 and Field B >=10, then allow input, if not, don't allow it.

If have been trying all types of functions, but cannot figure it out.
 
If you're completely controlling input (with scripts) - it's easy enough to prohibit duplicate entries but if users are enabled to use FMP menus (I NEVER permit that!) you can only WARN the user not to proceed. Create a calc field cConcat (text result, stored) to concat the contents, Field A & " " & Field B. Create a self relationship on the cConcat field. Create a calc field cCount (number result) Count(SelfOnConcatAB::cConcat). If you're scripting everything, don't permit the user to exit the record if cCount is greater than 1. If you're not, your only option is to put a calculation container field on all layouts that the users can access. If cCount is greater than 1 display a big red stop sign with appropriate warning otherwise display null.
Bill
 
Sorry - still half semi dazed from all the driving I've been doing this week :( I'm awaiting a LD call so can't tie up the phone line; I'll get back to you shortly.
Bill
 
2 Quad Espressos later .................
If you're completely controlling input (with scripts) you can ensure the contents of the 2 fields are valid before the users can exit the record being created/edited. Otherwise, you can only WARN the user not to proceed. Create a calc field cValidAmts (number result) Case(Field A>=10 and Field B>=10,1,0). Create a Global field (type, calc) gStopSign and populate it with an appropriate graphic (red stop sign/warning). Create calc field bStopSign (container result) Case(cValidAmts = 0,gStopSign) and place it on all layouts that the users can access. If you're scripting everything, don't permit the user to exit the record if cValidAmts = 0.
Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top