This is a quick demo on how you can use Page properties and ConfiForms macros together
So, we have a simple form with just 2 fields, one text field and another one is a page/blogpost field
Image Added
For this field we will lookup it's page properties
ConfiForms Form Definition |
---|
|
confluence-administratorsINLINE tttext
testFieldtestFieldtext pagePageCONFIFORMSpage |
For the demo, we have created a record that points at this page and we will get the value of "test field" page property
Page properties is actually defined using ValueView macro
Image Added
Page properties |
---|
|
Page properties |
---|
t tmf | | static field | This is a text in a static field in page property |
|
Reporting using page properties report
Image Added
Page properties report |
---|
cql | label = "pp" and space = currentSpace() |
---|
|
Page properties report configuration
Code Block |
---|
<ac:structured-macro ac:macro-id="2ff8264b-553e-40cb-84ea-534ed310329d" ac:name="detailssummary" ac:schema-version="2">
<ac:parameter ac:name="cql">label = "pp" and space = currentSpace()</ac:parameter>
</ac:structured-macro> |
Show data from ConfiForms and page properties using ConfiForms TableView
Image Added
ConfiForms TableView |
---|
|
testField pagepage property "test field" valuepage.pageProperties(test field) page property "test field" valuepage.pageProperties(static field) |
Storage format for the TableView:
Code Block |
---|
<ac:structured-macro ac:macro-id="d6389b22-191b-4aa2-a1c5-7c7a02e550b7" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">demoForm</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="ea84b9c6-e3d1-4a97-8f13-5fb7c4cf64ff" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">testField</ac:parameter>
</ac:structured-macro> <ac:structured-macro ac:macro-id="8b528074-606c-49ce-80a9-24c3689a3f02" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">page</ac:parameter>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="803ffffd-481a-4f4e-910a-51231598254c" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="overrideLabel">page property "test field" value</ac:parameter>
<ac:parameter ac:name="fieldName">page.pageProperties(test field)</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="a2e2514b-3a60-4bb9-97e8-f44685f7b00a" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="overrideLabel">page property "test field" value</ac:parameter>
<ac:parameter ac:name="fieldName">page.pageProperties(static field)</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro> |