Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Content layer
id1361564202
Content column
id1361564223
Content block
id1361564213

To filter diagrams by modification date


  1. Create a Generic Table.
  2. Set the Element Type to Diagram. Make sure to select the Include Subtypes check box. Click OK.
  3. Set the Scope where the diagrams will be searched for.
  4. Click the Image Modified icon in the Scope field and select Custom. The Query dialog opens.
  5. Select Create operation > Filter.

    Note

    If you cannot see the Filter operation, make sure the Expert mode is enabled.

    Image Modified

  6. Select Filter > Input > Find.
    Image Modified
  7. Set the Type to Diagram
    Image Modified
  8. Expand FindScopeContextual Variable.
    Image Modified
  9. Select Filter Predicate > Operation from Model > GreaterThanOrEquals.

    Note

    If you cannot see the GreaterThanOrEquals operation, make sure the Apply Filter box is not checked.


    Image Modified

  10. Select Predicate > Body > A > Script.
    Image Modified
  11. From the Language drop-down list, select Groovy.

  12. Insert the following script as the Body:

    Code Block
    titleGroovy
    import java.text.DateFormat;
    import java.util.Date;
    
    if (arg1) {
    Date date1 = DateFormat.getDateInstance(DateFormat.SHORT).parse(arg1.iterator().next()); 
    }

    Image Modified

  13. Select arg1 > Reset.
    Image Modified
  14. Select arg1 > Simple Navigation.
    Image Modified
  15. Select Modification date and set Is Applied to true.
    Image Modified
  16. Select Predicate > Body B > Script.
    Image Modified
  17. From the Language drop-down list, select Groovy.

  18. Insert the following script as the Body:

    Code Block
    titleGroovy
    Date M1 = new Date();
    M1.setMonth(M1.getMonth() - 1);
    M1

    Image Modified

  19. Click OK. To view the column, make sure to display it via the Columns button in the diagram toolbar > Select Columns > set the Modification date column to true.