Working With Data In Memory
 

Description
When you think of data, you usually think of it as a record being saved in your database. However, saving the data may not alway be a requirement. This is especially true when using QuickModules.com. For simplicity, and because no data structures or program variables other than database tables are available for storing data, it is convenient sometimes to simply keep the records in memory instead of saving them permanently.

For instance, suppose you want to create a simple application that asks the user for a number, and returns the square root of that number. Obviously, there is no reason why the data should be saved permanently. The number being input is useful only for performing the calculation and will never be used again. However, the only way to input this number and perform the calculation on it and have it displayed is to use a table. So you can create a table with two fields:

  1. InputValue: Number field to enter the number
  2. SqrtValue: Numeric Formula field, with the formula Sqrt([InputValue])

To input the value, create an Data Entry procedure and include the field InputValue as part of the screen. Now make sure that the 'Save data permanently' option is not selected. This will keep the data in memory temporarily and will not save it. To display the result, simply create a Data Display procedure that contains the field SqrtValue. This will cause the appropriate formula to be calculated and display.

 

Copyright © 2001 RIQ Technologies Inc. All rights reserved.
Copyright Policy, Privacy Policy, License & Terms of Use