Introduction
Since ECTR 5.2/1.1 "queries" have been removed and SmartLists shall be used. Users have to create the SmartLists themselves.
Administrators want to define SmartLists for their users and distribute them automatically.
Configuration Steps
These are examples and may need to be adjusted as required.
Step | Description |
---|---|
1 | Define your additional SmartLists in default.txt. customize/config/default.txt plm.system.smartlists = @plm.system.smartlists@;MY_CHECKEDOUT_DOCS;MY_CHECKEDOUT_DOCS_WITH_MASK;NX_DOCUMENTS_WITH_MASK;SEARCH_MAT #fixed search, no mask plm.system.smartlist.MY_CHECKEDOUT_DOCS.name = My checked out document plm.system.smartlist.MY_CHECKEDOUT_DOCS.icon = doc.search.icon plm.system.smartlist.MY_CHECKEDOUT_DOCS.macro = my_documents_by_status.txt #search by status with additional mask to _additional_ search critera plm.system.smartlist.MY_CHECKEDOUT_DOCS_WITH_MASK.name = My checked out document (with mask) plm.system.smartlist.MY_CHECKEDOUT_DOCS_WITH_MASK.icon = doc.search.icon plm.system.smartlist.MY_CHECKEDOUT_DOCS_WITH_MASK.macro = my_documents_by_status_with_mask.txt #search by status with additional mask to _additional_ search critera plm.system.smartlist.NX_DOCUMENTS_WITH_MASK.name = NX documents (with mask) plm.system.smartlist.NX_DOCUMENTS_WITH_MASK.icon = doc.search.icon plm.system.smartlist.NX_DOCUMENTS_WITH_MASK.macro = documents_by_doctype_with_mask.txt plm.system.smartlist.SEARCH_MAT.name = Materials plm.system.smartlist.SEARCH_MAT.icon = mat.search.icon plm.system.smartlist.SEARCH_MAT.macro = wizard/search_materials.txt |
2 | Create your macros: customize/scripts/macros/my_documents_by_status.txt searchCriteria = PARAMETER_MAP("doc_fields") //current user - fixed searchCriteria.USERNAME = $user //status - fixed searchCriteria.STATUS = "IA;IW" // exclude folder type "FOL" searchCriteria.DOCUMENTTYPE = "!FOL" //max rows - fixed searchCriteria.MAXROWS = "100" result = SEARCH("doc", searchCriteria) keylist = KEYLIST_FROM_SET(result) WRITE_RESULTLIST(keylist) customize/scripts/macros/my_documents_by_status_with_mask.txt searchCriteria = GET_MASK_INPUT( "SPECIAL_DOC_WITH_CLASSES", "doc.mask.title", "DOC") //user and status are set by macro, the values provided for them provided by the mask //will be ignored to ensure this list can't be missused for "any" kind of searches //to avoid confusions it es even better to use a mask here which don't have this feilds at all //as they are fixed and defined by this macro //current user searchCriteria.USERNAME = $user //parameter status is provided by system list definition searchCriteria.STATUS = "IA;IW" setId = SEARCH( "doc", searchCriteria ) keylist = KEYLIST_FROM_SET( setId ) REPORT(READ_DICTIONARY_TEXT( "plm.brobj.0107" ,"%1 objects found ...", "$count")) WRITE_RESULTLIST(keylist) customize/scripts/macros/documents_by_doctype_with_mask.txt searchCriteria = GET_MASK_INPUT( "DOKAR_DOC_WITH_CLASSES", "doc.mask.title", "DOC") //document types are set fixed in macro to prevent the misuse of the system list definition named "NX Documents" searchCriteria.DOKAR = "NXD;NXM;UGM;UGD" setId = SEARCH( "doc", searchCriteria ) keylist = KEYLIST_FROM_SET( setId ) REPORT(READ_DICTIONARY_TEXT( "plm.brobj.0107" ,"%1 objects found ...", "$count")) WRITE_RESULTLIST(keylist) |
3 | Define your search masks for SPECIAL_DOC_WITH_CLASSES. The mask SPECIAL_DOC_WITH_CLASSES was created by loading mask "STANDARD_DOC_WITH_CLASSES" in the mask editor, removing fields "user" and "status" and then "save as" SPECIAL_DOC_WITH_CLASSES: |
4 | Define the search mask for DOKAR_DOC_WITH_CLASSES. The mask DOKAR_DOC_WITH_CLASSES was created by loading mask "SPECIAL_DOC_WITH_CLASSES" in the mask editor, removing the field "document type" and it's label and then "save as" DOKAR_DOC_WITH_CLASSES: |