This topic contains 14 replies, has 0 voices, and was last updated by mwhite@hgyp.com 6 years, 12 months ago.
-
AuthorPosts
-
November 20, 2017 at 3:05 am #23124
v mithula sriHi Everyone,
I have a requirement like depending on customers birth day date we send them gift coupon and that coupon is valid till next month
so in order to do this we need those customers in a search. For example, i am a customer today is my Birthday November 20 so I should be present in the search till December 20. How can i apply this in saved searches by using formulas,Can anyone help what formula we need to use.
Thanks!
This is a cached copy. Click here to see the original post. -
November 20, 2017 at 3:14 am #23125
j.jcreate a saved search on customer – in filters select birthdate on today – this will list all customers having birthday on any day (variable) e.g. on nov 20 it will list all customers with birthday on nov 20 and the next day on nov 21 will show all with birthdate on nov 21
-
November 20, 2017 at 3:21 am #23126
v mithula sriThanks for your quick response J.J. But my requirement is like Need to pull all customers and they should be removed automatically after a month from his birth date.
-
November 20, 2017 at 7:03 am #23127
mwhite@hgyp.comYou should be able to use a relative date filter. Something like this:
-
November 20, 2017 at 7:28 am #23128
v mithula sriThanks for your reply mwhite@hgyp.com! It's working fine. But it won't work for past data i mean like if that customer birth data is like 20-nov-1998. Need to filter out through date and month. Can you guys help using custom formulas using (functions as decode and some other).
Thanks!
-
November 20, 2017 at 9:49 am #23129
mwhite@hgyp.comDuh! Sheesh. Can't believe I missed that. There may be something more simple, but this should do it:
CASE WHEN TRUNC({today} – to_date(TO_CHAR({birthdayField},'MM/DD') || '/' || TO_CHAR({today},'YYYY'))) BETWEEN 0 AND 30 THEN 1 END
This part is basically creates their birthday on the current year:
to_date(TO_CHAR({birthdayField},'MM/DD') || '/' || TO_CHAR({today},'YYYY'))
-
November 20, 2017 at 10:20 pm #23130
v mithula sriThanks mwhite!. It contains syntax error, Could please check it once
-
November 20, 2017 at 10:25 pm #23131
v mithula sriThanks mwhite!. It contains syntax error, Could you please check it once
-
November 21, 2017 at 3:23 am #23132
v mithula sriHi,
Can anyone suggest like which formula need to use for my requirement. For example i have a field called "BirthDate" in customer record (21-nov-1990). While building a search based on "birthdate", we should mention criteria like that customer has to be in search Results till (21-dec).
Thanks!
-
November 21, 2017 at 6:49 am #23133
mwhite@hgyp.comYou'll want to replace {birthdayField} with whatever field you're using.
-
November 21, 2017 at 7:05 am #23134
v mithula sriYeah i have replaced that field over their (formula you have assigned). Even it's getting error like syntax error
-
November 21, 2017 at 7:07 am #23135
v mithula sriWe need to pass this as criteria rite?. In saved search by using formula field, we place formula in formula field and that condition we need to take?
-
November 21, 2017 at 7:17 am #23136
mwhite@hgyp.comYes. Formula (numeric) and value equal to 1
-
November 21, 2017 at 7:27 am #23137
v mithula sriit's getting like this,
Attached Files
-
November 21, 2017 at 7:47 am #23138
mwhite@hgyp.comLet me test
-
AuthorPosts
You must be logged in to reply to this topic.