Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a document that needs to be edited frequently. Only a couple of values in the document change each time I edit it. How do I set the document up so that I only edit one instance of a value and then that value is copied to other fields automatically. Additionally, can the copied value be modified using a expression.

To clarify, if I have a document like this:

blah blah VALUE1 blah blah blah blah

blah blah blah blah blah blah blah blah

blah blah VALUE2

blah blah blah blah blah blah blah blah blah blah blah blah blah blah

blah blah VALUE1

blah blah 1.6*VALUE1

I can add a couple of formatted text entry boxes to the document, but I have no idea how to copy the values the user enters to the VALUE1 / VALUE2 fields, let alone evaluate the formula.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Follow these instructions for a demonstration of techniques that you should be able to adapt to your needs.

In the steps below, text in quotes indicates things you type (omitting the quotes) or that you choose from a list of items that you created, text outside quotes represents the name of a menu item, dialog box field, list item or button and ">" represents moving to the next step in the process (selecting a menu item, selecting a field or clicking a button). If quoted text is on a line by itself that indicates that it should be typed in the body of the document. Keypresses will be indicated by square brackets (e.g. [enter] indicates to press the enter key).

  • "Item Quantity "
  • Insert Fields > Other
  • Type User Field > Name "Quantity" > Value "0" > Apply (green checkmark)
  • Type User Field > Name "Price" > Value "0" > Apply (green checkmark)
  • Type Input field > Selection "Quantity" > Reference "Input Quantity" > Insert > "0" > OK > Close
  • [enter]"Item Price "
  • Insert Fields > Other
  • Type Input field > Selection "Price" > Reference "Input Price" > Insert > "0" > OK > Close
  • [enter]"Total Cost "
  • Insert Fields > Other
  • Type Insert Formula > Formula "Quantity * Price" > Insert > Close
  • [enter][enter]"You bought "
  • Insert Fields > Other
  • Type User Field > Selection "Quantity" > Insert > Close
  • " items at "
  • Insert Fields > Other
  • Type User Field > Selection "Price" > Insert > Close
  • " each."

Now click on the quantity input field and a dialog box will pop up. Enter a number and click OK. Click on the price field, enter a price and click OK. All the fields in the document should update and show the expected values. You can change the values in the inputs and everything will update again.

The result should look something like this:

Item quantity 12
Item Price 3.98
Total Cost 47.76

You bought 12 items at 3.98 each

share|improve this answer
    
Excellent. Just what I needed. –  Skizz Sep 10 '10 at 17:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.