docs(config): derived variables in the EDIT screen #21

Merged
allan merged 23 commits from docs/derived-variables into main 2026-10-21 22:26:31 +00:00
Showing only changes of commit 926299f2ee - Show all commits
+2 -2
View File
@@ -54,11 +54,11 @@ ACTIVE 1
For each row, Data Controller generates the following statements when the table is read:
```sas
attrib REGION length=$8 label='DERIVED: ifc(STATE in (''CA'',''OR'',''WA''),''West'',''East'')' format=$8.;
attrib REGION length=$8 label='REGION=ifc(STATE in (''CA'',''OR'',''WA''),''West'',''East'')' format=$8.;
REGION = ifc(STATE in ('CA','OR','WA'),'West','East');
```
The label defaults to the expression itself, prefixed with `DERIVED: `, so that computed columns are obvious when labels are switched on. The expression is truncated to the maximum label length.
The label is the variable name, an equals sign and the expression - `REGION=ifc(...)` - so the column shows both what it is and where it comes from when labels are switched on. The expression is truncated to the maximum label length.
The type and length are declared, not inferred, so a value is truncated exactly as you specify. If `VAR_FMT` is left blank, character variables default to `$<length>.` and numeric variables to `<length>.`; a date, time or datetime format makes the column render (and filter) as a date, time or datetime, the same way a stored column does.