setting the default value of a field

I can’t figure out how to set the Default value of a field. Setting the Text property doesn’t seem to stick. When I go into designer, create new record, it’s empty.

On load, I would like for one of my fields to have a default value and the user have the option of accepting that value or editing the field to append additional data to the field.

I’m missing something. Thanks for the help, be nice :).

Check out the Data Providers screen. Select a table and a column that interests you, and then select the Properties for that column. You will find options under Auto Enter (e.g. - Custom would let you enter say 12.00 for a default shipping cost).

There are several other ways to do this (either at the database level or programmatically).

Hope this helps,

Michael

Hi, Welcome to Servoy,

You have missed out on something :wink:
We need a bit more info to help
But we will promise to be nice…

  • Which version of Servoy are you using? 3.1.x,3.5.x
  • Windows/Linux/Mac?
  • Sybase (or some other database) If you don’t know, it will be Sybase since it is the default database…

What kind of field, number, text etc…
What’s default value you want…

I’m using 3.5.2, Windows, Sybase.

The field is a text field.

I want the default value to be a bulleted list, but I want the user to be able to add or subtract bullets if needed. In most cases, the user will choose to accept the bulleted list as input and proceed to the next screen without modification.

My ultimate goal is to be able to pull data from each field, which may or may not have been customized by the user, and put it all together in a report format (similar to the way Turbo Tax generates a report\forms based on data you enter).

Thanks!

Hi

Do you mean the default value is a single value from the bullet point list or the default value is the whole list?

default would be the whole list:

example-

LABEL: Enter the procedures to be used for downgrading an IS to a lower security level"

FIELD:

  1. Ensure processing has ceased.
  2. Perform software overwrite.
  3. Perform shutdown.

BUTTON: “Edit” or BUTTON: “Accept Input and Continue”

You say the field is a text field, but how is it formatted on the form? To display more than one line of text you need to format the field as a TEXT_AREA field.

kazar

yes, TEXT_AREA on the form. Just want to know the best way to set the default value, and have control of the formatting (bullets).

onNewRecordCmd:

note_field =	"1. Ensure processing has ceased.\n" +
					"2. Perform software overwrite.\n" +
					"3. Perform shutdown"
					
databaseManager.saveData()