User Tools

Site Tools


transformations:filter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
transformations:filter [2021/04/25 14:00] craigttransformations:filter [2021/07/19 02:15] – [Examples] craigt
Line 6: Line 6:
 =====Description===== =====Description=====
 This action calculates an [[syntax:start|expression]] for every row (without adding a new column) and keeps only rows where this expression is TRUE. All other rows are removed. This action calculates an [[syntax:start|expression]] for every row (without adding a new column) and keeps only rows where this expression is TRUE. All other rows are removed.
 +
 +If no rows satisfy the condition then all rows are removed.\\
  
 The expression must be a valid condition -- it must return either TRUE or FALSE for any row in the table. If it results in a non-boolean value (i.e. not TRUE or FALSE) for at least one row it will cause a project execution error.\\ The expression must be a valid condition -- it must return either TRUE or FALSE for any row in the table. If it results in a non-boolean value (i.e. not TRUE or FALSE) for at least one row it will cause a project execution error.\\
Line 22: Line 24:
 \\ \\
 =====Remarks===== =====Remarks=====
-**Examples of valid expressions:**+Examples of valid conditions:
 <code> <code>
-  [Amount]=0+[Amount]=0
      
-  [Length] * [Width] * [Height] <= 1000+[Length] * [Width] * [Height] <= 1000
      
-  contains([City], 'York')+contains([City], 'York')
      
-  not isempty([Email])+not isempty([Email])
 </code>   </code>  
  
-If no rows satisfy the condition then all rows are removed.\\ 
  
 \\  \\ 
 =====Examples===== =====Examples=====
-**Objective:** Find all rivers that are longer than 6000 km.\\+**Example:** Find all rivers that are longer than 6000 km.\\
  
 **Source table:** The longest rivers in the world **Source table:** The longest rivers in the world
Line 54: Line 55:
  
 \\  \\ 
-**Result:**+**Result table:**
 ^River  ^Length (km)  ^Continent  ^ ^River  ^Length (km)  ^Continent  ^
 | Nile  |  6650| Africa  | | Nile  |  6650| Africa  |
Line 60: Line 61:
 | Yangtze  |  6300| Asia  | | Yangtze  |  6300| Asia  |
 | Mississippi  |  6275| North America  | | Mississippi  |  6275| North America  |
 +
 +\\ 
 +====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: //3//)
 +  * [[https://community.easymorph.com/t//1625/4|Create a new table with columns based on row values]] ([[https://community.easymorph.com/uploads/short-url/4oGLUNDHrUfB971H80ciuOAtOTG.morph|Project]]; Module: //Module 1//; Group: //Tab 1//; Table: //Table 1//; Action position: //2//)
 +  * [[https://community.easymorph.com/t//1649/4|Update existing data in a database table]] ([[https://community.easymorph.com/uploads/short-url/yB6WDyNxKmlLT3bbm6mTr76C4Ri.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Where clause//; Action position: //2//)
 +  * [[https://community.easymorph.com/t//1766/1|Load only workbooks with given number of sheets]] ([[https://community.easymorph.com/uploads/short-url/AbWPlfPVBecqgZUBVTYlljwb9NO.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Get file names to load//;\\ Action position: //5//)
 +  * [[https://community.easymorph.com/t//2041/6|Join 2 tables with multi criterions equal and not equals in where]] ([[https://community.easymorph.com/uploads/short-url/kNkqMsDYMJjzjiN4C5g8O4g3YlA.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Join//; Action position: //3//)
  
 \\  \\ 
transformations/filter.txt · Last modified: 2024/03/07 10:22 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki