Home

Macros and Programming

 

CardboxForumsMacros and Programming > "Set Default values for drop down lists and option groups"

Set Default values for drop down lists and option groups

Current user: [none]
Register / Log In · Help

Posted By Post

mjprog

24-Mar-2006 09:02

Is it possible to set a default value when a record is first created for option groups and drop down boxes. For example I have an option group which contains yes and no and when a record is first created I want this to be set to no and I have a drop down list which has the options Not Catalogued and Catalogued and when a record is first created I want the drop down list to display not catalogued. Does anyone know how this would be done?

Charles Welling

24-Mar-2006 09:42

You will have to use Validation to do this. Edit the native format, and go to the properties of the field. Add the following validator: "Default Entry" and set it to the default option. If your drop-down list is as follows:

Y=Yes
N=No

then enter Y as the default entry, but DO NOT check the "Override any data the user has entered" option, but DO check "Type even if the field has not changed".

As soon as a user creates a new record, Cardbox will type a "Y" in the field, thus setting a default option. Users however can change this by selecting "No".

Charles

muruganad

28-Oct-2009 05:43

Exception: How to Set the default value of a drop down list.

Here is the solution..

<a href="http://muruganad.com/ASP.NET/ASP-.NET-Drop-Down-List-Default-Value.html">http://muruganad.com/ASP.NET/ASP-.NET-Drop-Down-List-Default-Value.html</a>

Thanks!

Murugan Andezuthu Dharmaratnam

<a href="http://muruganad.com">www.muruganad.com</a>

Quick Reply

Please log in or register before trying to post a reply.

 
© 2010 Cardbox Software Limited   Home