Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Blocking data entry

Posted on 2007-11-15
3
Medium Priority
?
199 Views
Last Modified: 2013-12-18
Have a field which asks the user if they are a registered representative. Have another field which asks for their agent_ID, I know how to force the input if the response to the initial registered representative question is yes, but how do I block the input of the field if the response is No.  Can entry to a field be prohibited with explanation as to why they are not allowed to enter a value.
0
Comment
Question by:jforget1
3 Comments
 
LVL 22

Accepted Solution

by:
Bill-Hanson earned 2000 total points
ID: 20289269
Sure.

One way is to hide the field when input is not required and show it when it is.  Here's an example:

Say you have a radio button named "registered_Rep" that has the choices "Yes" and "No".  The dependent field is named "agent_ID" and will only be visible if "registered_Rep" contains "Yes".  If "registered_Rep" contains "No", then the "agent_ID" field is hidden and is replaced by a message stating "Agent ID is not required".

To make this happen, you would need to place this hide-when formula on the field:

registered_Rep != "Yes";

Then, on a separate line (probably right under the field), add the text "Agent ID is not required" and place this hide-when formula on the text:

registered_Rep = "Yes";

To enter a hide-formula, place your mouse cursor on the paragraph to hide and display the properties window (Edit \ Properties).  In the properties window, switch to the "Hide-When" tab.  Check the "Hide paragraph if formula is true" checkbox and enter the formula in the field.  Hide-formulas are applied to block paragraphs (like a table cell or paragraph of text).

Now, we need to tell the "registered_Rep" field to refresh the form each time it is changed so that the hide-formulas will be re-evaluated.  To do this, select the "registered_Rep" field and display it's properties window (View \ Properties).  Now switch to the 2nd tab (Control) and select the "Refresh fields on keyword change" checkbox. Lastly, for radio-buttons, we need to enable an additional property.  Switch to the 3rd tab (Advanced) and select the "Run Exiting/OnChange events after value change" checkbox.

That should do it.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 20289375
You can use a simple hide when.  In that case, you must have your controlling field be a checkbox or radio button with "refresh on change" turned on.

Another way is via the Entering event or the similar onFocus event. You can put in code there to check the controlling field, and if it is not set, then remove focus from the field.  The user can try to enter it but will never succeed.
0
 

Author Comment

by:jforget1
ID: 20289538
I don't know why that did not occur to me, started thinking specifically of the validation area and not of just using a good old hide/when.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month12 days, 3 hours left to enroll

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question