...
TableView: ListView: CardView:
| The confidoc-table, confidoc-list, and confidoc-card macros are used to present the REST service content (or RSS, CSV, XML) as a table, list (WYSIWYG), or card, each with filtering and data sorting/ordering.
| ||||||||||||||||||||||||
ConfiDoc Field confidoc-field | This macro defines a field to display returned data within the ConfiDoc TableView or ListView macros.
| ||||||||||||||||||||||||
ConfiDoc Excerpt confidoc-excerpt | Use this macro to include in the Confluence page the HTML or binary content (such as images) from an external webserver
| ||||||||||||||||||||||||
ConfiDoc Excerpt Anchor confidoc-excerpt-anchor | This macro helps you to group content elements inside a block and easily reference this block later with the ConfiDoc Excerpt macro
| ||||||||||||||||||||||||
ConfiDoc Show-For (IF) Macro confidoc-show-for | This macro displays included content only for given users and/or groups
| ||||||||||||||||||||||||
ConfiDoc Globals confidoc-globals | This macro provides a convenient way to store and display global variables in Confluence
| ||||||||||||||||||||||||
CSS Rules for ConfiDoc Fields confidoc-field-css | This is a helper macro to format fields visually based on their values
|
Using filters
Uses Lucene like syntax ConfiDoc filters employ syntax similar to the queries in Apache Lucene for expressions, which supports grouping using brackets (at the moment no support for inner brackets). Supports filtering currently, ConfiDoc filters support only outer or single bracket sets, not inner or sub-brackets). Filters support matching for expressions that start with a wild-card. Supports , and filtering per field as well as for free text search (filter to seeking a match against any field value).
Operators The operators AND and OR are case-sensitive!
Supports Filters support negative results with "not notation, " to filter records that do not match the given filter : with the '!' is used for that. Example. For example: !f1:[empty] - will look search for records where the f1 field value is not empty (has some value).
Supports Filters can perform simple ariphmetic arithmetic operations on dates (for example, to add or substract days from today's date). See Here are some examples belowValid example: :
To match records where f1 contains 'success' and f2 is after yesterday or where f3 equals 'accepted':
(f1:*success AND f2:>[yesterday]) OR (f3:accepted)
...
To match records where f1 contains 'success' and where f2
...
is after yesterday or where f3
...
is not empty:
(f1:*success AND f2:>[today]-1) OR (!f3:[empty]) -
...
This filter would be invalid because ConfiDoc does not yet support inner brackets in expressions:
(f1:*success AND (f2:>[yesterday] OR (f3:accepted)).
...
Reserved words to use in expressions:
[empty] | To match empty values for particular field. Examplewhen a particular field in the returned data is empty; for example: field1:[empty] - will match records where field1 is empty (does not have a value , but even though the form defines this field) |
[now] | Current To match on the current time and date, useful ; often useed with '<' and '>' for comparing with dates stored. ExampleFor example: someDateField:<[now] - will match records where the field 'someDateField' has a value which is in the past compared to now (current time) |
[today] | Same as To match on the current date, much like [now], but without timehours and minutes |
[tomorrow] | To compare the returned data against tomorrow's date . Also something like ( [today]+1 could also be used instead) |
[yesterday] | To compare the returned data against yesterday's date . Also something like ( [today]-1 could be also used instead) |
'<' and '>' | Can These can be used together with date and datetime fields, as well as to compare values for values in the returned data with values stored in numeric fields stored |
! | To reverse or negate the filter condition. Example; for example: !field1:[empty] - will find records that have data in 'field1' field filled |
Some Additional examples:
- field1:[today]-5 - assuming field1 is of type date (or datetime), this filter will return records where field1 value is the returned values of field1 are not older than 5 days from before now:
field1:[today]+10-5 - - assuming field1 is of type date (or datetime), this filter will return records where the returned values of field1 value is not after 10 days from now
...
- field1:[today]+10
Using sorting and limiting the number of records returned
Supports ASC and DESC directions, ConfiDocs supports sorting results in ascending (ASC) and descending (DESC) directions. The syntax is similar to that in SQL syntax, and the ordering rules must be coma separated.
Order directions ASC and DESC are case-sensitive!
To Some examples: to limit the number of records returned, a LIMIT operator is used.Example: ; for example,
f1 ASC, f2 DESC
- will sort the dataset by the field f1 field values in ASC ascending order and by f2 in DESC descending order.Example2:
f1 ASC, f2 DESC LIMIT 2
- will sort the dataset by the field f1 field values in ASC ascending order and by f2 in DESC descending order, and will limit the number of records returned to 2.Example3:
LIMIT 5
2 - will limit the number of records returned to 25.