Change text based on drop down list entry

K

kpldd

I am trying to have text entered automatically based upon the selection made
from a drop down list. Here is what I have so far:

Drop down list items are: Entity A, Entity B, and Entity C
dropdown1 is bookmark name automatically assigned to my drop down list

I have a form field that has the code:
{ IF dropdown1 = "Entity A" "A" "Not A" }

When "Entity A" is selected in the drop down list, I get "Not A" as a result
in my form field. I cannot seem to get "A" to be the result.
 
J

Jay Freedman

I am trying to have text entered automatically based upon the selection made
from a drop down list. Here is what I have so far:

Drop down list items are: Entity A, Entity B, and Entity C
dropdown1 is bookmark name automatically assigned to my drop down list

I have a form field that has the code:
{ IF dropdown1 = "Entity A" "A" "Not A" }

When "Entity A" is selected in the drop down list, I get "Not A" as a result
in my form field. I cannot seem to get "A" to be the result.

In your IF field, the word 'dropdown1' is being treated as literal
text, not as a bookmark reference to be evaluated. And that text will
never match the literal text 'Entity A', so the IF always evaluates to
the False case.

Select the 'dropdown1' in the code and press Ctrl+F9 to make it into a
field (technically, it's equivalent to a {REF dropdown1} field) nested
inside the IF field.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
K

kpldd

Awesome. I knew it was one small, yet important detail like that I was
overlooking. The sad part of this whole thing is, (and I guess I should
complain to Microsoft about it) I was actually using the dialog boxes to
populate my formula. So, under the options button I was able to select the
bookmark that I wanted to add to the code and it did not include the field
code brackets. You would think that should be a part of the process.

Thank you so much Jay.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top