Solved

Blocking data entry

Posted on 2007-11-15
3
188 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 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Modify The View Selection Criterion through a Button 10 32
How to change default font size and font in Lotus Notes 9 6,800
Missing Rules 1 301
Migration Lotus to Exchange 2016 4 166
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 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