[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Infopath validation - show a message based on a control selection?

Posted on 2011-04-25
5
Medium Priority
?
716 Views
Last Modified: 2013-12-13
Hi,

I'd like to create a form in Infopath 2007 that shows a "hint" type text based on user's selection of a particular dropdown and possibly changes whether another control is required in order to submit (the asterisk). The logic would be:

Dropdown value = X, display "you must enter destination when using this service", and set control2 to REQUIRED.

Dropdown value = Y, display no text, and don't change any required fields (unless user already selected X in dropdown, then put it back to defaults now)

Is that possible WITHOUT code?

And how does that change in Infopath2010 - if at all?

thanks :)
0
Comment
Question by:runelynx
  • 3
  • 2
5 Comments
 
LVL 28

Accepted Solution

by:
clayfox earned 2000 total points
ID: 35460280
Yah this is possible without code in both IP 2007 and 2010.

You have 2 peices.

You have the notifications, which could be a message window or I often use a hidden section or text box. I update the text and make it appear and hide as needed.  

The other issue is control the required peice.  You have to use your own rules. So have a field which controls the required state. Then add a rule on submit or on another required field that if required state is true and control2 is blank show a message and do not complete or whatever to block them until control2 has a value.

Hope that helps.

Start small and play with it a lot to get the feel for it.
0
 

Author Comment

by:runelynx
ID: 35462105
Ok that seems simple enough.

I'm keeping it very simple... 1 dropdown w/ 3 options, and 1 blank rich text field to show messages depending on the selection in the dropdown.

The dropdown has values 1, 2, or 3.

I set a rule to make the rich text field say "test" if the dropdown is "1" - and it works :)   But if you change to 2, 3, or blank, the text stays in the rich text field and I don't really want that. Is there an easy way to make this clear out or do I need to set a rule for each possibility in the dropdown?
0
 

Author Comment

by:runelynx
ID: 35462122
If I make a validation rule to show a ScreenTip - where does that tip show up? I'm in the filler and it doesnt show up unless I make it do a dialog box as well...
0
 

Author Comment

by:runelynx
ID: 35462635
Whoohoo I got it :D

I can add a new rule to blank out the textbox whenever the dropdown changes, and just put that above the other one so it does both.

And i found the screentip, silly little hover thing, not very useful.

One thing, however, still perplexes me...   is it possible to make a control "cannot be blank" (i.e. required) when another control has a certain value?  I can't find any rules to do this...
0
 
LVL 28

Expert Comment

by:clayfox
ID: 35463150
You cannot use the default cannot be blank, you have to add the conditions to your rules manually so that the process does not run unless your conditions are met.

Glad you got it.

I have found it just takes lots of tinkering and baby steps to get a good feel for what can be done.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Stellar Exchange Toolkit: this 5 in 1 toolkit comes loaded with mega-software tool. Here’s an introduction to tools’ usage and advantages:
Web hosting control panels were first developed to make it faster and easier for most users to set up and operate websites. The graphical user interface (GUI) allows users to perform tasks by pointing and clicking rather than typing highly specific…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

829 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