GoldMine Expression fields are used to display text only. The information displayed can be free form text or a dbase formula. Users cannot enter or change any data in these fields and you are limited to 15 characters like field labels are.
Expression fields can be used as a field label, a question to be answered by the user, a field value, and a combination of them all.
For example, to create a title on a screen do the following:
- Right-click on the screen to add the expression field and choose Screen Design. The Designer toolbar displays.
- Click New on the Designer toolbar.
- Select –dBASE Expression– from the list of fields (it is located at the top of the list).
- Click OK to place the field on the screen.
- Double- click on the new field to display the Fields Properties dialog box.
- Click on the More Options button to display the Advanced Options dialog box.
- The field label cannot be blank so enter a “|” or other character to satisfy this requirement in the Global Lable or Expression fields. You can add a matching character at the end of your formula to help the appearance.
- For this example we will combine the title of the screen with Contact and Company information using a dBASE formula.
- “Personal Screen for “ – the text string including the next space enclosed in quotes.
- Trim(Contact) – the field name for the contact name and trimming any blank spaces
- iif(empty(Company), “|”,” of “ + trim(Company) + “|”) – if the Company field is not blank, this will add the text string “ of ” enclosed in quotes and including the needed spaces.
- Copy the following formula in the Field Data box (you may have to retype the quotes marks due to formatting):
“Personal Screen for ” + trim(Contact) + iif(empty(Company),”|”,” of ” + trim(Company) + “|”)
- Set any other properties such and label and field lengths and click OK to save. The new expression will display on the screen.
Using the example above you can create Expressions fields to display values based on an if statement, any contact or contact2 fields or just plain text.