web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

create a formula field to get a joint text field to gather a multiple choice field all in one

(2) ShareShare
ReportReport
Posted on by 155
Hello, I am looking to see if it is possible to create a formula field to get a joint text field to gather a multiple choice field all in one.
Example : 
My multiple choice field :
Special delivery : Private house, Residential neighborhood, Shopping center, Office building...
 
and the new formula text field would automatically push all the selected choices from the Special delivery to put it into a string value.
The objective is to be able to put that text field into a business rule.
 
I see that multiple choice field has no possibilities to be put into business rules, so this is the way I thought of doing it. A text field let's me create the business rule to say if it contains data, the continu the stage, and is it doesn't contain data, block next stage or field.
 
Any other ideas are welcome.
Thanks
Cat
Categories:
I have the same question (0)
  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    7,833 Super User 2025 Season 2 on at
    create a formula field to get a joint text field to gather a multiple choice field all in one
    Hello Cat,
     

    Yes, it is absolutely possible to create a formula field in Dynamics 365 (or Power Apps) to achieve this. You can create a calculated field that will automatically concatenate the selected options from your multiple-choice field into a single text string. This text field can then be used in your business rules.

    Here's how you can create this calculated field:

    Steps to Create the Calculated Field:

    1. Navigate to your Entity: Go to your entity in Power Apps (make.powerapps.com) or Dynamics 365 (Settings > Customizations > Customize the System > Components > Entities > Your Entity).

    2. Create a New Field:

      • Click on Fields.

      • Click New.

      •  

    3. Define the Field Properties:

      • Display Name: Give your new field a descriptive name (e.g., "Special Delivery Text", "Selected Delivery Options").

      • Name: This will be the logical name of the field (e.g., new_specialdeliverytext).

      • Field Requirement: Set this as needed (e.g., "Optional").

      • Searchable: Set this to "Yes" if you need to search by the combined text.

      • Data Type: Choose "Calculated".

      • Click Save.

      •  

    4. Define the Calculation:

      • After saving, the "Field" form will reload. You should now see a section called "Field Calculation". Click the "Edit" button next to it.

      •  

    5. Use the Formula Editor:

      • The Calculated Field editor will open. Here, you will define the formula to concatenate the selected options.

      • In the editor, you will use a combination of the If function and the individual option values of your "Special Delivery" multiple-choice field.

      •  
       

      Here's a sample formula structure. You will need to replace the logical name of your multiple-choice field (new_specialdelivery) and the integer values associated with each of your options (Private house, Residential neighborhood, etc.) with the actual values from your environment.

      If(Contains(new_specialdelivery, 1), "Private house, ", "") +
      If(Contains(new_specialdelivery, 2), "Residential neighborhood, ", "") +
      If(Contains(new_specialdelivery, 3), "Shopping center, ", "") +
      If(Contains(new_specialdelivery, 4), "Office building, ", "") +
      // Add more If statements for each of your multiple-choice options
      Left(Self, Length(Self) - 2) // Remove the trailing ", " if any options were selected

      Explanation of the Formula:

      • If(Contains(new_specialdelivery, 1), "Private house, ", ""): This checks if the multiple-choice field new_specialdelivery contains the option with the value 1. If it does, it adds the text "Private house, " to the string. If not, it adds an empty string.

      • You will repeat this If(Contains(...)) structure for each of your multiple-choice options, replacing the integer value and the corresponding text.

      • Left(Self, Length(Self) - 2): After concatenating all the potential options, there might be a trailing ", " if one or more options were selected. This part of the formula removes the last two characters (", ") from the resulting string. Self refers to the current calculated field.

      •  

    6. Save and Close:

      • Click Save and Close in the Calculated Field editor.

      • Click Save on the Field form.

      • Publish All Customizations for the changes to take effect.


      •  

    7.  

    How to Find the Logical Name and Option Values of Your Multiple-Choice Field:

    1. Go to your entity in Power Apps or Dynamics 365.

    2. Click on Fields.

    3. Find your "Special delivery" multiple-choice field and open it.

    4. The Name field will show the logical name (e.g., new_specialdelivery).

    5. In the "Options" section, you will see a Value associated with each of your choices (Private house, Residential neighborhood, etc.). These are the integer values (1, 2, 3, 4 in the example) you need to use in the Contains function of your formula.


    6.  

    Using the Text Field in Business Rules:

    Once you have created and published this calculated text field, you can use it in your business rules:

    1. Go to your entity and click on Business Rules.

    2. Create a new business rule or open an existing one.

    3. In your conditions, you can now select your new calculated text field (e.g., "Special Delivery Text").

    4. You can then use conditions like:

      • "Field [Special Delivery Text] contains data": To check if any option was selected in the multiple-choice field.

      • "Field [Special Delivery Text] does not contain data": To check if no option was selected.

      • "Field [Special Delivery Text] contains [specific text]": If you need to check for the presence of a particular selected option (be mindful of the ", " in your formula).


      •  

    5.  

    Important Considerations:

    • Order of Options: The order of the selected options in the resulting text field will depend on the order of your If statements in the formula.

    • Delimiter: The formula uses ", " as a delimiter. You can change this if needed.

    • Performance: For a very large number of multiple-choice options, a very long formula might become slightly less readable, but performance should generally be acceptable for typical scenarios.

    • Updating the Formula: If you add or remove options from your "Special delivery" multiple-choice field in the future, you will need to update the formula of your calculated text field accordingly.


    •  

    This approach provides a robust way to get the selected values from a multiple-choice field into a text format that can be used in business rules, effectively overcoming the limitation of directly using multiple-choice fields in business rule conditions. Remember to test your calculated field and business rules thoroughly after implementation.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak
  • Cat_Car Profile Picture
    155 on at
    create a formula field to get a joint text field to gather a multiple choice field all in one
    Thank you for the AI crafted response, but unfortunetaly the formula doesn't let me put in the multi choice field.
     
    Cat

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 235

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 175

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 156 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans