Is it possible to exclude the first row and first column from the search?
Currently, I use the below multi-search code:
## Macro Name: filter-all-tables ## Macro Title: Filter all tables ## Category: Confluence Content ## Macro has a body: N ## Body processing: None ## ## Source: https://community.atlassian.com/t5/Confluence-articles/The-Admin-s-tale-User-Macro-filtering-a-Confluence-table/ba-p/459369 ## Date implemented: yyyy-mm-dd ## Implemented by: xxx.yyy@zzz.com
## @@param FilterID:title=FilterID|type=string|required=true|desc=ID [a-z,A-Z,0-9 ## @param Label:title=Label|type=string|required=true|desc=Label ## @param Class:title=Length of the input field|type=enum|enumValues=short-field,medium-field,medium-long-field,long-field,full-width-field|default=long-field ## @param ColumnNumber:title=Column Number|type=string|required=true|default=-1|desc=Specify the column number or "-1" for the entire row
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
I think @Thomas Schlegel's instructions are pretty good though, he includes the code, and instructions on how to get it going. If you follow some of the comments you can see some nuances that others have input.
Many thanks Everyone and a big thank you to Thomas S, Thomas K and Alloisio. Your scripts are great and very helpful. I use Thomas K script as it simple and solves our problem.
Thank you for the above solution. It really helped me with using search feature within a long confluence table.
I also wanted to ask if there is any similar customisation that we can use to have a drop down filter for one of the columns in the same table where we added the search bar?
It will be of great help as i have a long table with about 500+ rows. It would be nice if i can have a drop down filter also.
Just in case someone needs multi-word, case insensitive, with intersection of all words instead of union of all words, I've adapted the script bellow.
Thank you very much to all that provided the previous code :)
<script type="text/javascript"> AJS.$("#searchInput").keyup(function () { var jqry = AJS.$ var rows = jqry("tr").hide(); if (this.value.length) { var data = this.value.split(" "); rows.filter( function () { all = true; for (i = 0; i < data.length; i++) { if (data[i]) { all = all && ($(this).text().toLowerCase().indexOf(data[i].toLowerCase()) >= 0); if (!all) { break; } } } return all; }).show(); } else rows.show(); AJS.$('thead tr').show(); }); </script>
I have a use case quite close to what you described. My scenrio is this: I have custom form/template/page created under the Knowledge Space. The custom form has two fields: first_name and last_name. I'd like to create a page with (1) an input field where the user can enter the record ID of a record which contains a customer's first name and last name. (2) a button called "generate PDF" button which will take the lira record ID as an input, looks up the record, extract the first_name value and the last_name value then populate these two values into the predefined template/page. Once the values are inserted properly into the fields on the page, the user then can export the from as a PDF file.
Based on what your described, I think it is every close to what I want but I'm sure how to go about doing it. Would you give me some tip of how-to?
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Actually, i have jira macro which can display the jira filter content in table format to confluence page.
Now, in table there is a column called "Billing status" it holds three values ie. Running, Started, Completed.
So if the Billing status is Running then it show in YELLOW, if the Billing status is Started then it show in RED and Completed in GREEN.
I tried to search around it and to achieve this i need to write an user macro..so anybody has the basic code that can capture the table content, so pls share, it will help and will do the changes to it as per the conditions.
I have a piece of very minimal knowledge of Confluence, So I would like to seek your help on the requirement which I have currently. I'm reorganizing the support structure for my team and as part of "typical" systems management, the L1 resources need to run a health check and check the License details in Confluence. But the team will not be having Admin permissions.
When I was looking for options, I came to know about User Macros in Confluence. So I'm wondering that can we achieve this by creating user macro. If so, Could you please guide me with the code.
@Anna Hummel did you follow @Thomas Schlegel 's initial how-to to create the user macro? If you still need assistance, please post a screenshot of your macro definition.
@Anna Hummel Sorry! I found (and fixed) the error in my comment from 2017-08-03:
## @@param 0:title=Lenght of the input field|type=enum|enumValues=short-field,medium-field,medium-long-field,long-field,full-width-field|default=long-field
...contains an extra "@". It should be like this:
## @param 0:title=Lenght of the input field|type=enum|enumValues=short-field,medium-field,medium-long-field,long-field,full-width-field|default=long-field
46 comments