Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Confiforms ListView HTML : duplicate table headers for each entry as a HTML table Edited

Hi!

I am using the following Vertuna tutorial  to create and custom a HTML table using the Confiforms ListView macro but even but trying to replicate precisely the example in the tutorial, I am not able create a cohesive HTML table... headers are created for every single entry, so essentially, 100 tables would be created if I have 100 entries.... 

 

@Alex Medved _ConfiForms_ could I please have your precious advise ? I just want to be able to create a plain html table that I could customize extensively.

 

This is the tutorial that I am referring to:https://wiki.vertuna.com/display/CONFIFORMS/Hacking+ConfiForms+ListView+macro+to+show+the+forms+data+in+Confluence+the+way+you+want

 

Could you please kindly assist ? this is a major roadblock for my project.

I tried with PlainView and ListView...no luck at all...

 

Thanks a million,

Cyril

 

 

1 answer

Anything you put inside the ListView or PlainView is rendered for each entry matching your filter.

And just to mention that the tutorial you are referring to works for Confluence up to version 5.9

Current versions of Confluence does not allow you to output "parts" of the table html tags as is shown there... Confluence tries to "fix" that for you and attempts to wrap into tables itself.

Thanks for the quick response but it doesn't answer my question at...Your explanation was naturally observed....

As mentioned, I used the Vertuna tutorials which clearly shows that the table header should be positioned outside the plainview or list view macro, so that's naturally what I tried too...in this scenario the header is simply not attached to the core body...

Anyway, I figured it out, so this is not an issue anymore.

However, would you be able to tell me if formulas such as sum or count are supported in plainview or listview at all ?Such as sum:([entry.field] or Count: ?

 

Thanks,

 

Cyril

No, they are not supported (not via ConfiForms Field macros at least). Only in TableViewMerger or using the ValueView macro (which can be used inside the ListView)

Thank you for your quick answer, much appreciated.

Are there any ways at all to create my own html table using confiforms data ?? or to overwrite confluence formatting through script?

Alternatively, could I run a script to automatically display a dynamic csv file on a confluence page ?

It looks like my hack was finally overwritten by confluence overnight...

Thanks in advance for sharing your insights..as usual, very valuable.

Nothing ? 

 

At the very least, I would like to be able to query the rest API within an html macro to get the JSON data ?

 

I tried to run the below script, but no luck at all ...Could you please advise ?

 

<script type="text/javascript">

AJS.$.ajax({

url: 'http://localhost:8090/ajax/confiforms/rest/filter.action?pageId=1671243&f=formname&q=entry:field'

type: "GET",

dataType: "json",

success: function(data) { AJS.log(data); }

});

</script>

What is "q=entry:field" Leave the "q" parameter empty. 

Rest API for ConfiForms is documented here

Another option to render a custom table is to use PlainView and use Velocity templating

See this page for the demo https://wiki.vertuna.com/x/AwOXAw

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

225 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you