Forcing a user to select an item from a combobox field in a form

Please could anyone point me in the right direction for forcing a user to select an item from a field.
I have a form with various fields on it.

I also have a layer on the form which is hidden until an item within a field is selected.
This opens up the layer and I now want the user to select one of the options in the drop down combobox.
At the moment it does open but I can just carry on without selecting it, therefore not capturing the data.

I have looked in the designer help and think I need to write a command that uses @Failure on the Input Enabled or Input Validation part of the field, therefore forcing the user to select an option from the field.

I really need to do this urgently if anyone can help - thanks a lot !

Who is Participating?
Field Input Validation:
for Field1:
@If(@ThisValue="";@Failure("Please enter value");@Success)

for Field 2:
Field Field1:=Field1;
@If(Field1!="";@if(@Thisvalue="";@Failue("Please enter value");@Success);Field2)
Richard QuadlingSenior Software DeveloperCommented:
Hi gray180,

Just a guess but is there a way of marking an item as the default item so you will always have AN item selected? If the user doesn't pick one the default will be used.


Richard Quadling.
Hi gray180,

Also, after the value is selected you need to refreshhideformulas... to get the hidden stuff to show.

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

gray180Author Commented:
Hi all,
Sorry for the delay in getting back to you.

Thanks for your help Madheeswar. I had to make a slight change to get it to work though; I don't know if it was because the layer was hidden I'm not too sure.
Here's the field 2 command I have put in.  It works, but would be grateful if anyone can see a problem with it?

FIELD Network:=Network;
@If(Domain!="customer1";@Success;@If(@ThisValue="";@Failure("Please enter value");@Success))

What happens is the user selects the network field and if it is not equal to "customer1" the "Customer_List" field doesn't require validating, hence success.

If it is "Customer1" then the field appears and a selection needs to be made.  I don't require the field data to be captured due to it is just there for information to the user.

Does this seem OK?  I understand what is going on with the command and it does work but I am no expert so I don't know if it will be OK.

Thanks for everyones input.  
Also Marilyn I had somehow unchecked the form properties for refresh all fields so thanks!
Looks OK to me ..
gray180Author Commented:
Good stuff.

Thanks again for your help.  Really is appreciated!!!!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.