Bug 155263 - Need a increasing-by-appearance sequence field with an initial value property
Summary: Need a increasing-by-appearance sequence field with an initial value property
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) alpha1+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/lo-writ...
Depends on:
Blocks: Fields-Variable
  Show dependency treegraph
Reported: 2023-05-12 14:37 UTC by Eyal Rozenberg
Modified: 2023-10-03 03:16 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

An MS Word document exemplifying SEQ field behavior (11.62 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-10-02 20:05 UTC, Eyal Rozenberg

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2023-05-12 14:37:52 UTC
A user should be able to insert a field with the following features:

* The first displayed value can be chose arbitrarily by the user when defining the field
* Additional copies of the field (i.e. which you would get by copy-pasting) cover consecutive elements of the sequence

You can't quite get that right now. 

* There is "Number Range" - where you can either have it auto-increment, or set the initial value, but for both to happen you need different field properties - and initial setter followed by non-setters.

* There is "Set Variable", which you could make auto-increment, i.e. my_var = my_var + 1 - but this has basically the same problem; if you want an initial value other than 1, you need to different fields.

Starting numbering in values other than 1 (or the first element of the sequence) is obviously necessary. we already offer that feature when numbering paragraphs. It should also be available directly and conveniently for fields.

As for _how_ to offer this feature - that's more of a bike-shed question. My personal suggestion would be offering a range-start property (as opposed to the value property) for Number Ranges; and perhaps even support this indirectly elsewhere.
Comment 1 m_a_riosv 2023-05-12 16:19:38 UTC
Please, can you attach a word sample file with that field.
Comment 2 Eyal Rozenberg 2023-10-02 20:05:10 UTC
Created attachment 189962 [details]
An MS Word document exemplifying SEQ field behavior

So, I can't show _exactly_ what I've asked for in MS-Word, but almost that.

In the attached document, the same field with the same identifier is used multiple times. But - the first time has a different switch to set the count to its initial value. So it's not literally copying the exact same field, but it's almost the same: SEQ foo \r 123 vs SEQ foo \n .
Comment 3 QA Administrators 2023-10-03 03:16:43 UTC Comment hidden (obsolete)