The formulafill statement fills every visible cell in the active field with the result of the specified formula.
This statement has one parameter:
formula – can be a literal value, a field or a variable, or an expression that returns the value you wish to put into the cells of the current field. The resulting value must match the type and format (if any) of the field you are placing it in or an error will result.
The formulafill statement fills every visible cell in the active field with the result of the specified formula. This statement evaluates the formula and if it is compatible with the current field type writes its result to every cell in that field for all selected records only.
Warning: If a cell already contains a value, formulafill will replace that value with the new one.
This simple example tells Panorama to clear all the selected cells of the active field. Therefore, the active field should be a text or choice type field.
This similar example works for numeric or date type fields.
This example tells Panorama to look at all the selected cells of the field Options and only fill the empty ones with the text string
formulafill ?(Options = "","n/a",Options)
This example alters the area code for the selected records in the numeric field Phone Number from
select strip(PhoneNumber) beginswith "213"
This example uses a formula to fill the visible cells in the field RenewalDate with a date that is one year beyond the computer’s current date. The final date will be the 1st of the month.
formulafill datepattern( month1st( today() + 365),"mm/dd/yy")
Note: When combined with the fillall statement, the formulafill statement can modify invisible records as well as visible records. See the fillall statement for details.
- change -- replaces text with new text in the current field (selected records only).
- changeword -- replaces one word with another in the current field (selected records only).
- changewordexact -- replaces one word with another in the current field (selected records only).
- emptyfill -- fills every empty visible cell in the active field with the specified value.
- fill -- fills every visible cell in the active field with the specified value.
- fillall -- modifies the operation of the following *fill* statement so that all records are modified, not just visible records.
- formulafillallfields -- fills every visible cell in all fields with the result of the specified formula.
- outlinelevel -- expands or collapses the entire database to show a specific level of data or summary level.
- propagate -- fills all the empty cells in the current field. Each empty cell is filled with the value of the first non-empty cell above it.
- propagateup -- fills all the empty cells in the current field. Each empty cell is filled with the value of the first non-empty cell below it.
- resetallrecordidts -- resets the internal record id and time stamps for every record in the current database.
- runmodifyfill -- runs the .ModifyFill procedure (if it exists).
- runningdifference -- calculates the running difference for the current field.
- runningtotal -- calculates the running total for the current field.
- sequence -- fills every visible cell in the current field with a numeric sequence.
- slidedata -- slides the columns at and to the right of the current column.
- speedcopy -- copies multiple adjacent fields from a record in one database to a record in another.
- summarylevel -- changes the summary level of the current line.
- unpropagate -- removes repeating data from the currently selected field. If several records in a row contain the same data, this statement erases all but the first (top) value.
- unpropagateup -- removes repeating data from the currently selected field. If several records in a row contain the same data, this statement erases all but the last (bottom) value.
|10.0||Updated||Carried over from Panorama 6.0, but no longer supports the *dialog* parameter. Can now be combined with the FillAll statement to fill both visible and invisible records.|