docs(developer-guide): the delete-record column is client-owned
The pre-edit hook example re-added _____DELETE__THIS__RECORD_____="No" when it re-read the table, mirroring the data step getdata.sas used to run. That column is created by the editor itself (it is the Delete? column) and is never part of the dataset, so the example no longer adds it - and a response that carries the name is refused by the editor, which the "What the hook does" bullet now states. Also notes the reserved name on the MPE_TABLES page, and says in the user guide that the Delete? column is created by Data Controller rather than being part of the table.
This commit is contained in:
1 parent
127f10fba9
commit
21fcf2d6fa
3 files changed
+5
-3
No files matched your search
@@ -101,7 +101,6 @@ The hook below is registered in `MPE_TABLES.PRE_EDIT_HOOK` for a table with a da
|
||||
|
||||
/* re-read the table, so the grid shows both quarters */
|
||||
data work.out (drop=&var_txfrom &var_txto &var_processed &drop_rk);
|
||||
_____DELETE__THIS__RECORD_____="No";
|
||||
set &orig_libds;
|
||||
where %inc newfilt;
|
||||
run;
|
||||
@@ -130,7 +129,7 @@ The hook below is registered in `MPE_TABLES.PRE_EDIT_HOOK` for a table with a da
|
||||
- **The user's clause.** `work.QUERY` is the filter's clauses as structured rows, and `%mp_filtergenerate` turns them back into a WHERE clause. This is the user's filter on its own, with no Row Level Security or validity clause mixed in.
|
||||
- **Data Controller's clause.** Calling `%mpe_filtermaster` with `filter_rk=-1` produces the part of the filter that is not the user's: the current-record validity clause and any Row Level Security, or `1=1` when there is neither.
|
||||
- **The combined filter.** The two clauses are combined as `( user OR previous-quarter ) AND ( validity + RLS )`, so the previous quarter is added to the user's selection without widening anything the user is not entitled to see.
|
||||
- **The rows.** `work.OUT` is rebuilt with the combined filter, using the same drop list as the data step `getdata` runs itself - the transaction and processing columns, plus `&drop_rk`, the surrogate key that `getdata` hides when a table is registered with `RK_UNDERLYING` - and sorted on `&sortpk`, because `getdata` sorts before the hook runs and does not sort again afterwards. On a bitemporal table `getdata` also deduplicates to the latest record per primary key (`by &pk &var_busfrom`); add that step too, or the re-read returns every temporal version rather than the current one.
|
||||
- **The rows.** `work.OUT` is rebuilt with the combined filter, using the same drop list as the data step `getdata` runs itself - the transaction and processing columns, plus `&drop_rk`, the surrogate key that `getdata` hides when a table is registered with `RK_UNDERLYING` - and sorted on `&sortpk`, because `getdata` sorts before the hook runs and does not sort again afterwards. On a bitemporal table `getdata` also deduplicates to the latest record per primary key (`by &pk &var_busfrom`); add that step too, or the re-read returns every temporal version rather than the current one. The delete column is **not** re-added: `_____DELETE__THIS__RECORD_____` is created by the editor itself and is never a column of the dataset, so a hook must not introduce it (a response that carries that name is refused by the editor).
|
||||
- **The returned text.** `filtref` is overwritten with the combined filter, so the clause the editor shows is the one that was actually applied.
|
||||
|
||||
### What it looks like
|
||||
|
||||
Reference in new issue
Block a user