If your Smartsheet account has a large number of projects, you may benefit from filtering them before displaying the list of projects in OnePager. That way, you can find the project(s) you are looking for more easily.
OnePager offers custom filtering of Smartsheet projects via the smartsheet-project-filter.json file, which needs to be stored in the following folder:
C:\Users\[your username]\AppData\Local\Chronicle Graphics\OnePager Bundle\data\
The JSON file looks like this:
{
"allRulesMustBeMet": "FALSE",
"rules": [
{
"project_attribute": "some_attribute",
"operator": "Equals",
"value": "some_value"
},
{
"project_attribute": "some_attribute",
"operator": "DoesNotEqual",
"value": "some_value"
}
]
}
To modify this JSON to meet your needs, first determine whether you want to set one filtering rule or many. And, if you want to set many rules, determine whether you want every rule to be satisfied before you display a Smartsheet project, or whether only one rule needs to be satisfied. Once you have determined this, set the "allRulesMustBeMet" value to either "TRUE" or "FALSE".
Next, define your rule(s). Each rule consists of three components: a project attribute, an operator, and a value.
A project attribute is a sheet metadata field provided by Smartsheet, such as "Owner". Smartsheet makes the following sheet metadata fields available to OnePager for filtering:
- AccessLevel
- CreatedAt
- DependenciesEnabled
- Favorite
- GanttEnabled
- HasSummaryFields
- Id
- ModifiedAt
- Name
- Owner
- OwnerId
- Permalink
- ReadOnly
- ResourceManagementEnabled
- TotalRowCount
- Version
An operator can be any of the following:
- Equals
- DoesNotEqual
- IsGreaterThan
- IsGreaterThanOrEqualTo
- IsLessThan
- IsLessThanOrEqualTo
- BeginsWith
- EndsWith
- DoesNotBeginWith
- DoesNotEndWith
- Contains
- DoesNotContain
- IsFalseNo
- IsTrueYes
- IsNull
- IsNotNull
Finally, your value is whatever you expect to be (or not be) assigned to the attribute you’ve specified. In this case we are looking for all projects that are owned by Bob, so our value is "Bob".
Our final sample JSON file should look like this:
{
"allRulesMustBeMet": "FALSE",
"rules": [
{
"project_attribute": "Owner",
"operator": "Equals",
"value": "Bob"
}
]
}
Once this smartsheet-project-filter.json file is saved in the appropriate folder, OnePager will locate and process its contents automatically.
Troubleshooting Project Filters
If your filter is not bringing back the correct projects from Smartsheet, or brings back no projects at all, please double-check the following:
- The JSON file must be named smartsheet-project-filter.json
- The JSON file must be located in the C:\Users\[your username]\AppData\Local\Chronicle Graphics\OnePager Bundle\data\ folder
- Ensure that your rules only reference Smartsheet's supported sheet metadata fields. Fields not listed in the section above are unsupported.
- Double-check your overall rule logic specified in the allRulesMustBeMet setting. If this is set to "TRUE", then all filter rules must be true for a project to display. If it is set to "FALSE", then a project will display if a project matches any one of the filter rules.
