Link to home
Start Free TrialLog in
Avatar of gray180
gray180

asked on

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

Experts,
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 !

Graham
ASKER CERTIFIED SOLUTION
Avatar of madheeswar
madheeswar
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.

Regards,

Richard Quadling.
Avatar of marilyng
marilyng

Hi gray180,

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

Regards!
Avatar of gray180

ASKER

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 ..
Avatar of gray180

ASKER

Good stuff.

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

Graham