STOR and GET functions |
Top Previous Next |
The STOR functions let you store numbers in nine memory locations numbered 1..9. For instance, the formula =STOR4(F5) would store the value from cell F5 in memory location 4. The GET functions retrieve the numbers stored in those in nine memory locations. For instance, the formula =GET4() would return the value stored in memory location 4. These functions greatly enhance the flexibility and usefulness of FormCalc SST macros, but to use them properly you must be mindful of their limitations. Why Use STOR and GET?•Using STOR and GET in formulas can sometimes be an easier way to reference data in your formulas, compared to storing the data in a Scratchpad column. •Using STOR and GET is currently the only way to pass data between macros.
Considerations for Using STOR and GETThe main thing you must be mindful of when using STOR and GET functions, is assuring that a formula containing a STOR gets called before any formula which contains a corresponding GET. This is not a problem when the STOR and GET are in two different macros: you just need to run the macro containing the STOR first, before the one containing the GET. Where it can be a problem is when STOR and GET are used in the same macro. The most common problem with using STOR and GET functions in the same macro worksheet is failing to insure that the formula containing the STOR is called before any formulas containing a corresponding GET for the same memory location.
How can you insure that formulas are called in the right order? The proper approach will depend on the calculation situation you face: ▪If the GET is used on the Formulas row of the worksheet (i.e., the GET is applied to every row of the target form, such as an invoice), then you might make sure that an IItem-triggered formula containing the STOR gets called on the first row of the invoice—before other rows where the GET might be called. This is a technique used in accessing header fields in QuickBooks Online or QuickBooks desktop editions, for instance. ▪If the GET is used on a Item-triggered formula row, then you need to assure that either a Formulas row formula or another text-triggered formula containing the corresponding STOR gets called before the formula containing the GET.
|