Use writer field value in formula

I am trying to create an auto calculating template:

I insert a table into writer

Then I insert fields into some cells

I want to use the fields in a formula

But the value of the cell appears always zero

Example: =<A1>

How can field value be used in writer?

  • If cell A1 contains text, then the formula = results 0, because Writer formulas cannot handle text, see https://issues.apache.org/ooo/show_bug.cgi?id=74155.
  • From your description it is not clear what you mean by “insert fields”.
  • Do you have already tried to use references instead of formulas?

This was working perfectly in LO3. I know since I have an invoice template that uses the product of two fields to calculate the line total. It just suddenly stopped working, so this is a bug, not a lack a features.

I’d like to upload a little sample odt to explain the problem, but can’t. I need karma. Whatever. Duh!

Here’s a link to the file: https://dl.dropboxusercontent.com/u/12668653/Writer%20input%20field%20calculation.odt

An example document is always good. Now I see, what you mean. Please write a bug report and attach the document.

How do you have insert the input field? I cannot insert an input field via Insert > Fields, if it is not bound to a user field, but your document has no user field.

By the way, I’m using version: 4.2.4.2 Build ID: 420m0(Build:2) on Ubuntu, just for completeness’ sake.

Regina, I simple go Insert | Fields | Function Tab | Input Field and then add the name as the Reference. It seems the bug is that the name cannot be entered, the input box is greyed out. So, when I think about it, I’m not really naming the input field at all, I’m just added the reference.

Lifeboy: “Function Tab” is the key, I have tried to use the Input Field from tab “Variables”.

I filed a bug for this here: https://www.libreoffice.org/bugzilla/show_bug.cgi?id=81126

Can anyone that uses a windows platform maybe confirm that this is similar and not just in the Linux version and confirm the bug please?

To work around this problem define a user variable, insert an input field for this user variable and then use the user variable in your formula.

Using the input field from tab “Functions” gives the error. Bug reports are https://issues.apache.org/ooo/show_bug.cgi?id=125228 and fdo#81126.

The bug you filed wat fixed on OpenOffice, but it’s still in LibreOffice 4.2.6.3 Build ID: 420m0(Build:3) on Ubuntu. How to do we bump this to the LO team?