Derived Fields

Top  Previous  Next

It is possible create new display fields based on combinations of other fields in your database.  Combine fields of fields and perform mathematical operations.


Creating a Derived Field:



Your product table may have a price Unit_Price and you want to know how much your inventory is currently worth.


1. Select for example your Products file from the Database Tree and expand it


2. Right Click on Items then then Click on Insert Item to bring up the Page Item Properties Dialog.


3. Enter the  for your new Field


4. Click on The Edit Value button btn_edit_expression to bring up the Edit Value Dialog




Using this screen you can build your derived field e.g. in this case the UnitsInStock times the UnitPrice. Calculations need to be enclosed in curly brackets or braces for them to be treated as a calculation rather than as text as shown in the example above.


5. Click on OK and the new field will appear as part of the page layout.


You can of course move and format any new fields just like the regular database fields.


Note: In addition to math you can manipulate text database fields in a variety of ways, including substring, to upper case, concatenate etc.