chore: automated commit

This commit is contained in:
Allan Bowe 2021-05-12 22:29:24 +03:00
parent fc4b5d839c
commit 88f10cb680
25 changed files with 23850 additions and 9 deletions

View File

@ -27,6 +27,9 @@ license-checker --production --relativeLicensePath --direct --start ../dcfronten
echo '```' >> docs/licences.md echo '```' >> docs/licences.md
echo 'building mkdocs' echo 'building mkdocs'
pip3 install mkdocs
pip3 install mkdocs-material
pip3 install fontawesome_markdown
python3 -m mkdocs build --clean python3 -m mkdocs build --clean
#mkdocs serve #mkdocs serve

View File

@ -6,17 +6,35 @@ Dates & datetimes are actually stored as plain numerics in regular SAS tables. I
![displayed](img/dcc-dates1.png) ![source](img/dcc-dates2.png) ![displayed](img/dcc-dates1.png) ![source](img/dcc-dates2.png)
This format must also be present / updated in the metadata view of the (physical) table to be displayed properly. This can be done using DI Studio, or by running the following (template) code: Supported date formats:
``` * DATE.
* DDMMYY.
* MMDDYY.
* YYMMDD.
* E8601DA.
* B8601DA.
Supported datetime formats:
* DATETIME.
Supported time formats:
* TIME.
* HHMM.
In SAS 9, this format must also be present / updated in the metadata view of the (physical) table to be displayed properly. This can be done using DI Studio, or by running the following (template) code:
```sas
proc metalib; proc metalib;
omr (library="Your Library"); omr (library="Your Library");
folder="/Shared Data/your table storage location"; folder="/Shared Data/table storage location";
update_rule=(delete); update_rule=(delete);
run; run;
``` ```
If you have other dates / datetimes / times you would like us to support, do [get in touch](http://datacontroller.io/contact)!

View File

@ -73,7 +73,7 @@ Leave blank if not required.
### PRE_EDIT_HOOK ### PRE_EDIT_HOOK
The full path / location (unquoted) of a SAS program to execute prior to an edit being made. This allows a particular view of a table to be presented to a user for editing (eg masking columns, removing rows etc). Leave blank if not required. The full path / location (unquoted) of a SAS program (or Viya Job, SAS 9 Stored Process) to execute prior to an edit being made. This allows a particular view of a table to be presented to a user for editing (eg masking columns, removing rows etc). Leave blank if not required.
#### SAS Developer Notes #### SAS Developer Notes
The PRE_EDIT_HOOK program will be `%inc`'d after the data has already been extracted. A table called `work.out` will be available that has all the same columns (in the same order) as that shown on the EDIT screen on the frontend. The observations will have been sorted on the [BUSKEY](#buskey). The surrounding code looks like this: The PRE_EDIT_HOOK program will be `%inc`'d after the data has already been extracted. A table called `work.out` will be available that has all the same columns (in the same order) as that shown on the EDIT screen on the frontend. The observations will have been sorted on the [BUSKEY](#buskey). The surrounding code looks like this:
@ -102,12 +102,12 @@ Leave blank if not required.
### PRE_APPROVE_HOOK ### PRE_APPROVE_HOOK
The full path / location (unquoted) of a SAS program that will be `%inc`'d before an approval diff is generated. This modifies the value that is presented to an approver on the approve screen, and can be helpful in terms of ensuring that information is presented in way that can be easily consumed by approvers. The full path / location (unquoted) of a SAS program (or Viya Job, SAS 9 Stored Process) that will be `%inc`'d before an approval diff is generated. This modifies the value that is presented to an approver on the approve screen, and can be helpful in terms of ensuring that information is presented in way that can be easily consumed by approvers.
Leave blank if not required. Leave blank if not required.
### POST_APPROVE HOOK ### POST_APPROVE HOOK
The full path / location (unquoted) of a SAS program that will be `%inc`'d after an approval is made. This is the most common type of hook script, and is useful for, say, running a SAS job after a mapping table is updated, or running a model after changing a parameter. The full path / location (unquoted) of a SAS program (or Viya Job, SAS 9 Stored Process) that will be `%inc`'d after an approval is made. This is the most common type of hook script, and is useful for, say, running a SAS job after a mapping table is updated, or running a model after changing a parameter.
Leave blank if not required. Leave blank if not required.
### SIGNOFF_COLS ### SIGNOFF_COLS

View File

@ -0,0 +1,66 @@
---
layout: article
title: Dynamic Cell Selects
description: Configure SAS programs to determine exactly which values can appear within which cells in your Data Controller table!
og_image: img/cell_validation1.png
---
# Dynamic Cell Selects
This is a simple, but incredibly powerful feature! Configure a SAS process to run when clicking a particular cell. Data Controller will send the *row* to SAS, and your SAS program can use the values in the row determine a *column* of values to send back - which will be used in the frontend selectbox.
So if you'd like the user to only see products for a particular category, or ISIN's for a particular asset group, you can perform that easily.
## Frontend Configuration
Open the MPE_VALIDATIONS table and configure the library, table and column that should contain the selectbox. In the RULE_TYPE column, enter either:
* HARDSELECT_HOOK - The user entry MUST match the returned values
* SOFTSELECT_HOOK - The user can view the list but type something else if they wish
The RULE_VALUE column should contain the full path to the SAS Program, Viya Job or SAS 9 Stored process that you would like to execute. If the value ends in ".sas" then it is assumed to be a SAS program on a directory, otherwise a SAS web service (STP or Viya Job).
## Backend Configuration
If creating a Stored Process, be sure to deselect the 'automatic SAS macros' - the presence of %stpbegin or %stpend autocall macros will cause problems with the Data Controller backend.
You can write any SAS code you wish - you will receive a table called `work.source_row`, and you should create a table with one column named `work.dynamic_values`. These are the values that will be subsequently returned to the dropdown in the cell that the user has seleected.
Example code:
```sas
/**
@file
@brief dynamic cell validation for product code
@details The input table is simply one row from the
target table called "work.source_row".
Available macro variables:
@li MPELIB - The DC control library
@li LIBDS - The library.dataset being filtered
@li VARIABLE_NM - The column being filtered
<h4> Service Outputs </h4>
Output should be a single table called
"work.dynamic_values" in the format below.
|DISPLAY_VALUE:$|RAW_VALUE:??|
|---|---|
|$44.00|44|
**/
%dc_assignlib(READ,mylibref)
proc sql;
create table work.DYNAMIC_VALUES as
select distinct some_product as raw_value
from mylibref.my_other_table
where area in (select area from work.source_row)
order by 1;
```
This feature is used extensively in Data Controller to fetch tables specific to a library, or columns specific to a table:
![](img/cell_validation1.png)

View File

@ -22,5 +22,9 @@ Once this is done, you are ready to upload:
<iframe width="560" height="315" src="https://www.youtube.com/embed/Reg803vI2Ak" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> <iframe width="560" height="315" src="https://www.youtube.com/embed/Reg803vI2Ak" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
The final table will look like this:
![](img/excel_results.png)
If you would like further integrations / support with excel uploads, we are happy to discuss new features. Just [get in touch](https://datacontroller.io/contact). If you would like further integrations / support with excel uploads, we are happy to discuss new features. Just [get in touch](https://datacontroller.io/contact).

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -12,6 +12,7 @@ nav:
- Table Viewer: dcu-tableviewer.md - Table Viewer: dcu-tableviewer.md
- Configuration: - Configuration:
- Dates / Datetimes: dcc-dates.md - Dates / Datetimes: dcc-dates.md
- Dynamic Cell Selects: dynamic-cell-selects.md
- Emails: emails.md - Emails: emails.md
- Excel Formulas: excel.md - Excel Formulas: excel.md
- Groups: dcc-groups.md - Groups: dcc-groups.md