Next revision | Previous revision |
transformations:either [2016/06/12 12:21] – created dmitry | transformations:either [2021/07/17 15:14] (current) – craigt |
---|
===== Either table ===== | {{ transformations:EitherTableAction.png}} |
| ====== EITHER TABLE ====== |
| Category: Workflow / Internal \\ |
| |
Between two input datasets (a result of previous transformation and a final state of another table) chooses one that is not empty. If both tables are not empty then it gives preference based on transformation settings. | \\ |
| =====Description===== |
| Between two input datasets (the result of the previous action in the current table, and a final state of another table), //Either table// chooses the one that is not empty. If both tables are not empty, it gives preference based on the action settings.\\ |
| |
**Use cases** | \\ |
| =====Use cases===== |
| * "If-then" types of workflows. In this scenario, the workflow should be organized in a way that makes empty either one table (when a condition is fulfilled) or another (when the condition is NOT fulfilled). Then //Either table// is used to pick a non-empty result dataset. Since both tables can have different sets of actions, it allows for applying different action logic depending on the condition. |
| * Insertion of arbitrary datasets at any point in an action chain with the help of the [[transformations:sandbox|Sandbox action]]\\ |
| |
* "If-then" types of workflows. In this scenario the workflow should be organized in a way that makes empty either one table (when a condition is fulfilled) or another (when the condition is NOT fulfilled). Then Either transformation is used to pick a non-empty result dataset of one of these tables. Since both tables can have different sets of transformations it allows applying different transformation logic depending on the condition. | \\ |
* Insertion of arbitrary datasets at any point of a transformation chain with the help of [[transformations:sandbox|Sandbox transformation]] | =====Action settings===== |
| ^Setting^Description^ |
| |Other table|Select the table with the results that will be used in place of the current dataset, if it's not empty.| |
| |Mode|Choose which dataset will have priority if both are not empty. Options: //Use this table if it's not empty, otherwise\\ use the other one// or //Use the other table if it's not empty, otherwise use this one//.| |
| |
| \\ |
| =====Community examples===== |
| * [[https://community.easymorph.com/t//675/5|Compare two Excel sheets with EasyMorph]] ([[https://community.easymorph.com/uploads/short-url/xQLWtAogCqcMrglyfXLKmrAF7aR.morph|Project]]; Module: //Main//; Group: //Main//; Table: //Result//; Action position: //2//) |
| * [[https://community.easymorph.com/t//1279/4|Example: Constructing JSON]] ([[https://community.easymorph.com/uploads/short-url/m063pNiVTAgev8a7h7z93mlXbAU.morph|Project]]; Module: //Table2json//; Group: //Tab 1//; Table: //Result JSON//; Action position: //2//) |
| * [[https://community.easymorph.com/t//2186/2|Excel IRR formula]] ([[https://community.easymorph.com/uploads/short-url/r3hO74ebEfwvCgq0YqkKt7bqGM2.morph|Project]]; Module: //NPV//; Group: //Group 1//; Table: //RESULT//; Action position: //3//) |
| |
| \\ |
| =====See also===== |
| * [[transformations:sandbox|Sandbox]] |
| |
**See also** | |
* [[transformations:sandbox|Sandbox transformation]] | |