Mautic Community Forums

Creating a decision with operator "LIKE"

This is probably a really simple question, but I cannot find it covered in the docs.



I’m trying to create a simple subscribe form where the user checks options to indicate what types of information they are interested in.



Mautic-forum-question-ss1.png



If I set the checkbox group to save into the Lead’s fields, I get something like Interests = “Special Deals, Events & Conferences”.



Mautic-forum-question-ss4.png



This is fine, but I would also like to tag the user based on this field, so I have created the following campaign (it only deals with “Special Deals” at present, but you can imagine there would be a decision tree for each option).



Mautic-forum-question-ss2.png



I figured, since the field is a comma-separated list, I would be able to use the “like” operator in my decision to match a partial string in the field value.



Mautic-forum-question-ss3.png



However, I’m unsure of the syntax… do I enclose my string in % like SQL, * like Google, or nothing at all? Anyone know?



I’m also wondering if my idea is going to be foiled by the “actions only trigger once” issue? Is it viable to change the tags on a user if they return to the form and change their selections?



Or am I just approaching this all wrong?

This is probably a really simple question, but I cannot find it covered in the docs.

I’m trying to create a simple subscribe form where the user checks options to indicate what types of information they are interested in.

If I set the checkbox group to save into the Lead’s fields, I get something like Interests = “Special Deals, Events & Conferences”.

This is fine, but I would also like to tag the user based on this field, so I have created the following campaign (it only deals with “Special Deals” at present, but you can imagine there would be a decision tree for each option).

I figured, since the field is a comma-separated list, I would be able to use the “like” operator in my decision to match a partial string in the field value.

However, I’m unsure of the syntax… do I enclose my string in % like SQL, * like Google, or nothing at all? Anyone know?

I’m also wondering if my idea is going to be foiled by the “actions only trigger once” issue? Is it viable to change the tags on a user if they return to the form and change their selections?

Or am I just approaching this all wrong?

OK, I think I was over-complicating things with the tags.

I can do essentially the same thing by NOT setting any tags and creating a lead list based directly on the comma-separated “Interests” field.

If I go back to the form and update my settings, the smart lists update correctly, which I assume would add / remove the user from the appropriate campaigns correctly also?

I will do some testing and make sure this is the case. If it works, I’ll post how I got it going here, just in case anyone else struggles to get their heads around this process like I did.