A field containing the number of items in a variable

asked 2018-03-19 16:20:53 +0200

damienjadeduff gravatar image

updated 2018-03-19 16:21:46 +0200

In LibreOffice Writer, if I want to insert a page number I do:

Insert > Field > Page Number

Similarly, if I want to insert the number of pages I do:

Insert > Field > Page Count

I can also use LibreOffice to keep track of numbering of things like tables, for example, or, in my example a custom field like question number. To use this I do (there are other ways of doing this):

Insert > Field > More Fields... > Variables > Number Range > Question

(latter assuming I have created a custom field called Question, which I can do from the same place)

However, what I want to do is insert a field that provides the number of items in such a range. For example, if I have 3 questions, and I want to insert the question count, it should insert a field that is currently reading 3, but would update to 4 if I insert another question.

My use case is this: I am using automatic numbering to number questions in exams. However, manually inserting the number of questions is prone to human error (and is a very useful thing to do to ensure students do not miss questions). I am imagining there are many similar use cases so am imagining this kind of thing may be possible.

Thank you in advance for your consideration.

edit retag flag offensive close merge delete


I'm afraid this is not available. I searched thoroughly through the fields and did not find anything close to that.

I fully agree with the usefulness of your claim. You should open a feature request in Bugzilla.

ajlittoz gravatar imageajlittoz ( 2018-03-19 17:19:40 +0200 )edit

Thanks for taking a look ajlittoz - I will have a look at Bugzilla.

damienjadeduff gravatar imagedamienjadeduff ( 2018-03-24 08:32:52 +0200 )edit