I have a page created in Confluence but uses Macros from ConfiForms as well. We would like to display only items due within 14 days. Can anyone help with how this could be accomplished (if it can be).
Thank you in advance for any help,
Dena
Hi @Dena Ahlers
You can use the following filter (assuming the field to store dates is named "due"... but you can adjust accordingly)
due:>=[entry._today] AND due:<=([entry._today]+1209600000)
where 1209600000 is 14 days in milliseconds
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another question if you don't mind, I have this set up currently with a ConfiForms Field Definition (attached) Would I need to create a Rule definition to apply the filter or is there somewhere else it should be applied?
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Was your question about the date field itself? About removing other dates from the date picker?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm wondering where I would use the filter you provided. If I would need to create a different field type and where I would be entering the filter itself?
Is that part of this Macro or would I be using a different macro? or use the macro along with a rule with the filter you provided? Trying to figure out what is the best process.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My understanding of this question was that you want to filter collected data by the due date and show only the rows that match this range
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yup. but I am not sure where to put the filter that you provided.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Every View macro in ConfiForms has this parameter, which you can use to specify a filtering expression
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm sorry @Alex Medved _ConfiForms_ can you help me with one last thing? My field name is fnAAGduedate for the Due Date label. Would I then change the filter to
fnAAGduedate:>=[entry._today] AND due:<=([entry._today]+1209600000)
I tried this but it did not return the right information so I am assuming I have it incorrect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
fnAAGduedate:>=[entry._today] AND fnAAGduedate:<=([entry._today]+1209600000)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Alex, I did try that and it brings back all of the records, not just the records due in 14 days. This is what I had to ensure I didn't miss something.
fnAAGduedate:>=[entry._today] AND fnAAGduedate:<=([entry._today]+1209600000)
If I change it to date:>=[entry._today] AND fnAAGduedate:<=([entry._today]+1209600000)
It returns 0 records, but I have at least 1 record that should meet the 14 day criteria. Do I need a today's date field? Thank you again for your help. If you need any other screenshots please let me know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why do you want to change anything in this expression!?
I dont understand
If you have a fnAAGduedate that has a value within 14 days from today then you should see a record in the view.
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't necessarily want to change anything, I just want the right information to appear. Right now it shows all items from months ago to future due dates. I only want it to show items that are due within 14 days from the day they are looking at the page. I'm assuming I am missing something.
You originally said to use this
due:>=[entry._today] AND due:<=([entry._today]+1209600000)
Unfortunately this brings up 0 results.
When I added the field name, then it brought up all fields with due dates ranging from 11-1-23 to 02-09-24
fnAAGduedate:>=[entry._today] AND fnAAGduedate:<=([entry._today]+1209600000)
I'm trying to figure out how to get this expression to work with how the page is configured. I'm wondering if it is confused on how the date is set up yy/mm/dd or if it needs an additional date field added. I'm sorry I don't know enough about Confluence to understand the best way to get this to work.
I attached a screenshot of how the date is displayed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
BTW, the date format yy/mm/dd means you have
YEAR MINUTES DAY
Why I have said "due" for the due date, is beacuase I had no idea how the field is named in your form...
That is why I have said
(assuming the field to store dates is named "due"... but you can adjust accordingly)
Demo:
Complete example:
<ac:structured-macro ac:macro-id="56e68d64-c768-4d28-a8a7-b0d572101355" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="3a2dbf1a-67a6-47c0-a959-2522a6c0a2b2" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="b83f0a1f-ebe3-4fdd-bb5d-40046697575d" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">t</ac:parameter>
<ac:parameter ac:name="fieldLabel">t</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="fa44c7ce-79da-44fc-a3be-afca2cd66e13" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">fnAAGduedate</ac:parameter>
<ac:parameter ac:name="fieldLabel">fnAAGduedate</ac:parameter>
<ac:parameter ac:name="type">date</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<h1>ALL</h1>
<ac:structured-macro ac:macro-id="fba09d71-8154-4682-8253-affa45299934" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<h1>FILTERED </h1>
<p>as per <a class="" href="https://community.atlassian.com/t5/Confluence-questions/Is-it-possible-to-add-a-filter-that-will-only-show-items-with-a/qaq-p/2599072?utm_campaign=&utm_content=post&utm_medium=email&utm_source=atlcomm#M291259">https://community.atlassian.com/t5/Confluence-questions/Is-it-possible-to-add-a-filter-that-will-only-show-items-with-a/qaq-p/2599072?utm_campaign=&utm_content=post&utm_medium=email&utm_source=atlcomm#M291259</a>
</p>
<ac:structured-macro ac:macro-id="9dd9f791-858a-4244-ae24-a97e26d883a5" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="filter">fnAAGduedate:>=[entry._today] AND fnAAGduedate:<=([entry._today]+1209600000) </ac:parameter>
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
Hope it helps...
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks again Alex!
I found the issue I was having is that I am on an older version and
[entry._today] doesn’t seem to be supported in our version. Changing that to [today] in the filter seemed to fix it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, it must be some very very old version of ConfiForms then :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Meet the engineers who are making the Confluence magic happen at Atlassian ✨
RSVP now!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.