Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can I limit / restrict table rows with Scaffolding?

Heth Siemer
Rising Star
Rising Star
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.
April 18, 2018

I have a table data macro, with a table, and some scaffolding fields. I have multiple scaffolding tables on one page in tabs.

In one table, I need to have one row and one row only, no more. If the information is wrong they need to update that table. I would like to lock this table at 1.

The next table will have varying rows once all the approvals have been given, depending on what the document was used for. I do not want to lock this table down.

Then on another page we have a sign up sheet for training with a maximum of 20 slots on one form and a maximum of 50 on the other. To prevent people from signing up and being "overflow" then throwing a fit. I would like to either number my rows, or lock this down to 20 (or 50).

Even better would be the ability to also remove everyone's ability to move and delete any scaffolding rows, as people have been playing musical orders in my table in order to claim a spot over someone who came first (it's suppose to be first come first serve), or adding rows to a set list.

Any suggestions? I'm on Confluence 6.6.3 (server)

1 answer

1 vote
Mike Pearson
Contributor
June 14, 2018

I unfortunately don't know a way to limit user's ability to use the add/delete/move rows functionality in the table-data macro.  I don't think that it is possible.

For the 1-row table, can you just create a standard Confluence table with a single row? ....or is there some reason you'd want to use the table-data macro in this case?

As for the other tables, I can only think of very cumbersome workaround (I haven't tried myself, but it should work in theory):

  1. Create a page template with the Scaffolding fields that would be in a table row
  2. Create a reporting page that creates a table that reports on the entries (child pages), using the Reporting plugin report-table macro. Sort by creation date so that you know the first-come-first-serve order.
  3. On the same reporting page use a report-block to count the number of child pages.  If it is below a certain number (20, 50, whatever your desired max is), display an "add-page-form" macro that allows the user to add an entry using the template in step (1).  If the child count is above the threshold, display some kind of message ("Sign-up maximum reached", or whatever...).

Good luck!

Heth Siemer
Rising Star
Rising Star
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.
June 14, 2018

The reason behind the single row: It's for weekly status reports. My customer's team likes to break the formatting so he wants scaffolding so they can only use the edit contents button (I removed the edit button with CSS). Basically, we tried to make it stupid-proof.

Making template pages would be a way to cumbersome task for the ask. I might see if there's some CSS I can use to hide the move and delete functions like I did with the Edit button.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events