Organising Your App Development
You've probably figured out that it's easy to lose things, so let's address that issue.
If you've got your template appTagged (or have a common field on ALL of the templates other than appTags) then you can keep track of your creations by creating a table.
Your first template should be a template which contains a table showing all of your templates and documents and rulesets.
{
"systemHeader": {
"templateId": "74746c80-8378-11e6-99b1-71ee944cf59f",
"systemType": "template",
"summaryName": "All Templates And Documents"
},
"components": [
{
"componentName": "sc-datatables",
"name": "allTemplates",
"label": "All Templates",
"columnSearch": true,
"enableColumnResizing": true,
"enableColumnMoving": true,
"filter": "{'query':{'bool':{'filter':[{'term':{'appTags':'myApplication'}},{'term':{'systemHeader.systemType':'template'}}]}}}",
"fullWidth": true,
"gridColumns": [
{
"displayName": "Template Name",
"field": "systemHeader.summaryName",
"href": "/form/{{{documentId}}}",
"type": "url",
"sort": {
"direction": "desc",
"precedence": 1
},
"urlOpenIn": "newWindow"
},
{
"displayName": "DocumentId",
"field": "documentId",
"href": "/form/{{{documentId}}}/74746c80-8378-11e6-99b1-71ee944cf59f",
"urlOpenIn": "newWindow",
"type": "url"
}
],
"showReload": true
},
{
"componentName": "sc-datatables",
"name": "allDocuments",
"label": "All Documents",
"columnSearch": true,
"enableColumnResizing": true,
"enableColumnMoving": true,
"filter": "{'query':{'bool':{'filter':[{'term':{'appTags':'myApplication'}},{'term':{'systemHeader.systemType':'document'}}],'must_not':[{'term':{'appTags':'ruleset'}}]}}}",
"fullWidth": true,
"gridColumns": [
{
"displayName": "Document Name",
"field": "systemHeader.summaryName",
"href": "/form/{{{documentId}}}",
"type": "url",
"urlOpenIn": "newWindow"
},
{
"displayName": "DocumentId",
"field": "documentId",
"href": "/form/{{{documentId}}}/74746c80-8378-11e6-99b1-71ee944cf59f",
"urlOpenIn": "newWindow",
"type": "url"
}
],
"showReload": true
},
{
"componentName": "sc-datatables",
"name": "ruleset",
"label": "Rulesets",
"columnSearch": true,
"enableColumnResizing": true,
"enableColumnMoving": true,
"filter": "{'query':{'bool':{'filter':[{'term':{'appTags':'myApplication'}},{'term':{'appTags':'ruleset'}},{'term':{'systemHeader.systemType':'document'}}]}}}",
"fullWidth": true,
"gridColumns": [
{
"displayName": "Document Name",
"field": "systemHeader.summaryName",
"href": "/form/{{{documentId}}}",
"type": "url",
"urlOpenIn": "newWindow"
},
{
"displayName": "DocumentId",
"field": "documentId",
"href": "/form/{{{documentId}}}/74746c80-8378-11e6-99b1-71ee944cf59f",
"urlOpenIn": "newWindow",
"type": "url"
}
],
"showReload": true
}
],
"appTags": [
"myApplication"
]
}
If you've done it right, when you view the template, it should show any documents created with 'myApplication' appTags. It should also show itself!