Hi there,
I am trying to copy rows from a table based on specific text in a column from one confluence page to other. I looked for 'Excerpt' macro option to do this task but seems like there is no option to do this based on specific text.
In the above table, I want to copy rows where Status column contains 'Load Complete' or row color is blue, whichever option is feasible.
Thanks for the help.
Vivek
Hi @Vivek Singh
Do you want the content to be updated automatically from the table?
I don't think this is possible. And sadly, I can't imagine any workaround or another solution for that. I'm sorry.
The only thing you could do is check out this plugin:
Regards, Dominic
Thank you @Dominic Lagger for helping out.
Is it possible to achieve the above task using REST API, i haven't worked on it but I have seen it as an option on doing these operations on other forums.
Regards,
Vivek Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vivek Singh
It would be possible, but a really bad hack (in my opinion)
First, you would have to get the page content where the table is stored. You need the GetContent funcction.
http://example.com/confluence/rest/api/content?spaceKey=TST&title=Cheese&expand=space,body.view,version,container
Then you have to parse the content by your own. So here you have to search the table. One you get the table, you can parse, where the background-color is blue or where the state is 'Load Complete'.
If you want to do it with an own user macro and velocity, it will be really hard work (and a lot of try and error). If you want it with python, you should be able to achive this.
If you achieved it, let us all know :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Dominic Lagger for the quick response, really appreciate that :)
Other thing I have in mind is, how to have some validations on my confluence page? For e.g. in a particular section in the page I want to check if names have an email hyperlink or not? Is it also possible only through REST or there are other easier options available.
Regards,
Vivek Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It depends how the names are recognisable? Do you need to check always just 5 names? Or all names which could appear on a page?
What you could do is writing a user macro which do it for you. But as before, you get the page content and have to parse the page. If you can spot the names with a parser, then it's possible.
In confluence, again, the possibility is to write a user macro. But user macros are written in "velocity". So this would be very tricky to make such a check.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.