# Routing Notification for Multiple Select Choices \[RESOLVED\]

**URL:** <https://community.gravityforms.com/t/routing-notification-for-multiple-select-choices-resolved/14361>\
**Category:** Get Help\
**Tags:** gform\_notification, routing, configure-routing, conditional-logic\
**Created:** [February 2, 2023, 8:02pm UTC](https://community.gravityforms.com/t/routing-notification-for-multiple-select-choices-resolved/14361 "2023-02-02T20:02:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ax.ph-specialproject](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@ax.ph-specialproject](https://community.gravityforms.com/u/ax.ph-specialproject)\
**Post date:** [February 2, 2023, 8:02pm UTC](https://community.gravityforms.com/t/routing-notification-for-multiple-select-choices-resolved/14361/1 "2023-02-02T20:02:31Z")

</div>

I am migrating form from Caldera to Gravity and we are stuck with the Routing notification for 2 selected values. Basically we have a form select field for Practice Area and a select field for County.  
So email-1 should receive notifications when:  
Practice Area → Business Law **AND** is County → Sussex,  
So email-2 should receive notifications when:  
Practice Area → Business Law **AND** is County → New Castle,  
So email-3 should receive notifications when:  
Practice Area → Nursing Law **AND** is County → Sussex,

Unfortunately, this is not possible with the current routing rules as the only available conditions were (is, is not, greater than, less than, contains, starts with, ends with)

---

<div class="post-metadata">

**Author:** ![faisalahammad](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/faisalahammad/32/13948_2.png) [@faisalahammad](https://community.gravityforms.com/u/faisalahammad)\
**Post date:** [February 3, 2023, 7:02pm UTC](https://community.gravityforms.com/t/routing-notification-for-multiple-select-choices-resolved/14361/2 "2023-02-03T19:02:41Z")

</div>

This type of routing requires custom coding to create conditional notifications based on specific values of multiple fields. You can use Gravity Form’s hook system or a plugin to accomplish this. Here’s an example using the `gform_notification` hook:

```auto
add_filter( 'gform_notification', 'change_notification_email', 10, 3 );

function change_notification_email( $notification, $form, $entry ) {
  $practice_area = rgar( $entry, '2' );
  $county = rgar( $entry, '3' );
  if ($practice_area == "Business Law" && $county == "Sussex") {
    $notification['to'] = "email-1@example.com";
  } elseif ($practice_area == "Business Law" && $county == "New Castle") {
    $notification['to'] = "email-2@example.com";
  } elseif ($practice_area == "Nursing Law" && $county == "Sussex") {
    $notification['to'] = "email-3@example.com";
  }
  return $notification;
}

```

In this example, the hook checks the values of the Practice Area and County fields and routes the notification to the appropriate email address based on the specified conditions. The field IDs (2 and 3 in this case) must be updated to match your form fields.

---

<div class="post-metadata">

**Author:** ![ax.ph-specialproject](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@ax.ph-specialproject](https://community.gravityforms.com/u/ax.ph-specialproject)\
**Post date:** [February 3, 2023, 7:20pm UTC](https://community.gravityforms.com/t/routing-notification-for-multiple-select-choices-resolved/14361/3 "2023-02-03T19:20:40Z")

</div>

Thank you Faisal for this very detailed explanation. This is a good way to achieving what I need but my client isn’t familiar working on codes as we do and they can’t keep track on these emails directly on the Notification settings. I can say this functionality should be included in the future updates of Gravity whereon in Caldera and Ninja this is readily available.

Again, I really appreciate your help.

---

<div class="post-metadata">

**Author:** ![faisalahammad](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/faisalahammad/32/13948_2.png) [@faisalahammad](https://community.gravityforms.com/u/faisalahammad)\
**Post date:** [February 4, 2023, 5:10pm UTC](https://community.gravityforms.com/t/routing-notification-for-multiple-select-choices-resolved/14361/4 "2023-02-04T17:10:29Z")

</div>

You’re welcome! I’m delighted that I could be of assistance. I understand that your client may find it difficult to keep track of the emails through the notification settings.

I appreciate your kind words and thank you for your feedback. Please don’t hesitate to reach out if there’s anything else I can do to help.

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [February 6, 2023, 3:18pm UTC](https://community.gravityforms.com/t/routing-notification-for-multiple-select-choices-resolved/14361/5 "2023-02-06T15:18:15Z")

</div>


