Solved

Blocking data entry

Posted on 2007-11-15
3
191 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Incorrect reply-to address Lotus 2 47
Updating Lotus Notes workspace icons with new server 1 150
Lotus notes view not working using Trim 14 216
Bulk lotus notes account creation 3 106
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

738 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