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 -- How to set a filter for all Views on a page?

I love the ability to use URL parameters to pass a filter to a page that displays multiple Confiforms TableViews, CardViews, etc.   This works great.

https://wiki.vertuna.com/display/CONFIFORMS/Creating+links+to+filter+views+from+request+parameters+-+url

Is there a way to hard-code the filter for the page, rather than pass it in a URL parameter?

E.g. I have a form with a lot of records, each with a populated Date field.  

I'd like to create a page for each date, with several different CardViews or TableViews on it ... and I want to set a Date to use as a filter for all of them.   I know I can filter each of those View macros ... but I'm wondering if there is a way I can create a filter once on the page, that applies to all the Confiforms macros on the page.

2 answers

May be to use an "auto-link" field with a predefined pattern?

I've used that technique with other pages, and it works great.

But in that case you are defining one page, and then changing the information displayed on it, by passing the filter in the URL.  This works great as long as other people don't need to add to the information.

In this case, I wanted to create a different page per record, so that the reader can add to it.  (In this case, this is an "Agenda" page for meetings, and wanted to pre-fill it with a lot data from Confiforms, to which people would add more information, during the meeting.)

After asking the question, I found a solution that is probably better than what I was suggesting. 

If one wraps all or most of the page in a Confiforms ListView macro, then one can specify the filter there (in this case, Date:date20200803), and then this gets passed to all other Confiforms macros inside it.

This does not solve the problem if I have also have other kinds of Confiforms views (TableViews and CardViews) on the page -- unless these can also be placed inside inside the ListView?   

But for my particular case, this works great.

Also, after discovering this, I found the section "Why Confiforms 'auto-wraps' everything with Confiforms ListView on a created page." in this tutorial: https://wiki.vertuna.com/display/CONFIFORMS/Using+ConfiForms+app+as+template+engine+to+create+pages+in+Confluence#UsingConfiFormsappastemplateenginetocreatepagesinConfluence-WhyConfiForms"auto-wraps"everythingwithConfiFormsListViewonacreatedpage

And now it makes a lot of sense!

So the right solution is to have Confiforms create the target page for you, then it populates the filter in the ListView on the page.

And in fact if you have ListViews, TableViews, CardViews all on the target page, then the Create Page action puts the same id-based filter in all these Confiforms macros.  That really solves my problem.

Very clever!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

How To: get the most out of the new Confluence navigation and Home

Hi Community, Elaine again from Confluence Cloud Product Management. Most of you have used the new Confluence navigation and Home for some time by now. Not sure what changed or just want to lear...

514 views 4 10
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