# Segment based on field selection

**URL:** <https://forum.mautic.org/t/segment-based-on-field-selection/8061>\
**Category:** General Discussion\
**Created:** [March 31, 2017, 6:17am UTC](https://forum.mautic.org/t/segment-based-on-field-selection/8061 "2017-03-31T06:17:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurentm](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@laurentm](https://forum.mautic.org/u/laurentm)\
**Post date:** [March 31, 2017, 6:17am UTC](https://forum.mautic.org/t/segment-based-on-field-selection/8061/1 "2017-03-31T06:17:52Z")

</div>

Hello  
  
I hav created a form with ProductType in it (this is a custom field with select type in which i have two values in it EE and Textile.  
  
I have created two segment EE and Textile, and in the segment settings I have included filter based on the field value EE and Textile respectively to each one (Textile for Textile Segment, and EE for EE segment).  
  
On the form I have included as Action Add to Segment, Add contact to selected segment(s) and i added the two value EE and Textile.  
  
Nevertheles if i select only one value in the form, it seems the contact get added to both segment and not only to the one that got selected in the dropdown.  
  
When I check in the form view results I see the contact having only one value, so it is recorded properly from the form. The problem seems to come from Segment allocation.  
  
Here is a print screen of my cron tasks : [https://snag.gy/qSB75C.jpg](https://snag.gy/qSB75C.jpg)  
  
What I am doing wrong ?

---

<div class="post-metadata">

**Author:** ![laurentm](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@laurentm](https://forum.mautic.org/u/laurentm)\
**Post date:** [March 31, 2017, 6:17am UTC](https://forum.mautic.org/t/segment-based-on-field-selection/8061/2 "2017-03-31T06:17:52Z")

</div>

Hello  
I hav created a form with ProductType in it (this is a custom field with select type in which i have two values in it EE and Textile.  
I have created two segment EE and Textile, and in the segment settings I have included filter based on the field value EE and Textile respectively to each one (Textile for Textile Segment, and EE for EE segment).  
On the form I have included as Action Add to Segment, Add contact to selected segment(s) and i added the two value EE and Textile.  
Nevertheles if i select only one value in the form, it seems the contact get added to both segment and not only to the one that got selected in the dropdown.  
When I check in the form view results I see the contact having only one value, so it is recorded properly from the form. The problem seems to come from Segment allocation.  
Here is a print screen of my cron tasks : [https://snag.gy/qSB75C.jpg](https://snag.gy/qSB75C.jpg)  
What I am doing wrong ?

---

<div class="post-metadata">

**Author:** ![Yannick038](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yannick038/32/117_2.png) [@Yannick038](https://forum.mautic.org/u/Yannick038)\
**Post date:** [March 31, 2017, 9:04pm UTC](https://forum.mautic.org/t/segment-based-on-field-selection/8061/3 "2017-03-31T21:04:20Z")

</div>

Hi Laurent,

Did you try to remove the form’s action “add to segment”  
In deed your contacts will be created on form submission and then the cron jobs will update each segment automatically depending on the filters.

If you tell your form to add the contact to two segments it will be added to the two segments without checking the filters/condition

---

<div class="post-metadata">

**Author:** ![mausm](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@mausm](https://forum.mautic.org/u/mausm)\
**Post date:** [March 31, 2017, 11:41pm UTC](https://forum.mautic.org/t/segment-based-on-field-selection/8061/4 "2017-03-31T23:41:41Z")

</div>

> [@21669:laurentm](#):
>
> if i select only one value in the form, it seems the contact get added to both segment and not only to the one that got selected in the dropdown.

What version are you using?  
mautic:leadlists is an ancient cron and no longer used, if I recall: [https://www.mautic.org/community/index.php/4855-2-0-new-mautic-cli-commands/0](https://www.mautic.org/community/index.php/4855-2-0-new-mautic-cli-commands/0)

I can’t even get the campaigns to work based a form condition in 2.7.1. Once it reaches a condition, the campaign stops as if there’s no further steps.

If you are using 2.7.1, could you please post your workflow?

---

<div class="post-metadata">

**Author:** ![laurentm](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@laurentm](https://forum.mautic.org/u/laurentm)\
**Post date:** [April 10, 2017, 9:20am UTC](https://forum.mautic.org/t/segment-based-on-field-selection/8061/5 "2017-04-10T09:20:40Z")

</div>

I am using the last version of Mautic.  
I have just setup a form and two segments at the moment  
Is there any way we can test it is working without running cron task ? I tried to copy paste the path in my browser but i got a 403 error

---

<div class="post-metadata">

**Author:** ![laurentm](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@laurentm](https://forum.mautic.org/u/laurentm)\
**Post date:** [April 11, 2017, 5:14am UTC](https://forum.mautic.org/t/segment-based-on-field-selection/8061/6 "2017-04-11T05:14:48Z")

</div>

IT was indeed a problem of cron task
