PDA

View Full Version : Word 2010 conditional rules for option fields



IvicaPro1987
03-12-2015, 03:51 PM
Hi
We have a Word Document which is connected to a database with information from our clients employees. In that Word using the mailing function we have several "mergefield" text fields and then we have option fields which need to be connected with the external database. The problem is that we cannot connect the option fields with data from the external database. We have tried it with conditional rules but there is no way to create conditions that if a Textfield has a male employee than the option field automatically switches to option "M".
Here is a screenshot:
12995

If the person in fields for name (germ. Name) and surname (germ. Vorname) is a male worker then the option field for Sex (germ. Geschlecht) switches to male (germ. mänlich). Also if the worker is german speaking worker then the option field for language (germ. Sprache) switches automatically to german (germ. deutsch). The fields for name und surname are mailing fields in wich the data is pulled from a database from a payroll software. Is there a way to automatize the option fields either with macro code or something else.

Thank you kind regards

gmayor
03-13-2015, 01:58 AM
Word has no way of determining whether a name is male or femail. If there is a field for the sex then that's an entirely different issue. You can use a conditional field to insert a checked or unchecked radiobutton character in place of the option button e.g

mänlich: { IF { MERGEFIELD Geschlecht} = "m*" "x" "#" }
weiblich: { IF { MERGEFIELD Geschlecht } = "m*" "#" "x"}

Replace x and # with the symbol characters from the wingdings font for checked radio button and unchecked radio button. The option buttons clearly will no longer work as such

IvicaPro1987
03-13-2015, 08:12 AM
Thank you for the fast answer gmayor but I am a beginner in using the more advanced functions in word. We, in our company, until now, never used word for the creations of advanced forms. We mostly used Excel and PDF's for forms. Can you please make an example for us.

Thank you and kind regards.

gmayor
03-13-2015, 08:33 AM
Open the attached file Name.docx and attach the data source Male & Female Data.docx - merge to a new document.

IvicaPro1987
03-20-2015, 01:26 AM
Thank you very much. We found what we wanted :)

Kind regards