Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-18-2024, 02:17 PM
ondacreep ondacreep is offline HELP with multiple if problem Windows 11 HELP with multiple if problem Office 2021
Novice
HELP with multiple if problem
 
Join Date: Nov 2024
Posts: 2
ondacreep is on a distinguished road
Angry HELP with multiple if problem

Hello, I'm a long time lurker who can normally get things to work from reading the excellent information from this site. I have run into an issue that I just can't put together and am hoping that posting specifics can help you help me.



I have a document that I'm trying to replicate with check boxes. The source field is named EthnicityRace and it contains the following choices in order:


American Indian or Alaska Native
Asian
Native Hawaiian or Other Pacific Islander
Black or African American
White


When one race is marked, my check boxes work fine using the following field code (using American Indian or Alaska Native in this example):




IF "{EthnicityRace}" = "American Indian or Alaska Native" "" "" \* MERGEFORMAT



The problem comes when multiple races are selected, the source outputs { string.Join("",EthnicityRace )} which produces Asian,White or Black or African American,White as examples.


How can I account for all variables in this scenario?


Thanks for any help!
Attached Images
File Type: jpg Untitled.jpg (39.0 KB, 10 views)
Reply With Quote
  #2  
Old 11-18-2024, 03:31 PM
macropod's Avatar
macropod macropod is offline HELP with multiple if problem Windows 10 HELP with multiple if problem Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

There is no field test that would be practical for the scenario you describe. Your source data need to have either just one ethnicity choice in the Ethnicity field or multiple ethnicity fields (one for each possibility), each of which can be populated with, say, Y or N. The only workaround would be to output «EthnicityRace» as a string then use a macro that finds those outputs in the resulting merged documents and updates the existing checkboxes.

As for the example you gave, it could be expressed as:
{IF«EthnicityRace»= "American*" {SYMBOL 254 \f Wingdings \u } {SYMBOL 253 \f Wingdings \u }}
There is no need to write the choices out in full or for the \* MERGEFORMAT switch.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 11-18-2024, 03:52 PM
ondacreep ondacreep is offline HELP with multiple if problem Windows 11 HELP with multiple if problem Office 2021
Novice
HELP with multiple if problem
 
Join Date: Nov 2024
Posts: 2
ondacreep is on a distinguished road
Default

Thanks for the reply. I'm using this document as a template in a 2nd party application and don't think macros are allowed.



I guess I'll have to create individual Y/N fields for those choices.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update Contents tab in the Adv. document properties dialog? Problem with multiple languages. MatLcq Word 6 10-07-2020 05:55 AM
multiple devices, copies of office - installation problem smackenzie Office 0 09-08-2016 04:36 AM
multiple accounts problem in outlook 2010 pa2mdbb Outlook 0 01-18-2016 09:16 AM
Multiple Powerpoint Presentations Hyperlinked Audio Problem. donoskaro PowerPoint 0 03-24-2014 01:07 PM
Multiple monitor problem - white bar at top of screen RomanB PowerPoint 0 10-24-2013 02:53 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft