Start a new topic

Dictionary for Gift Code Based on Gift Amount

We are looking to create a dictionary that does the following:

Replacement Value            Value to Match On

Annual                                 Under $250

Mid-Level                            $250 to $2,499

Major                                  $2,500+


We are self hosted, so API code would be an option too, but we'd need very clear instructions. Thank you!


1 person has this question

Hi John,

Something seems to be not quite right. Could you take a look at this file and see what we might be missing?

Thank you,

Lisa

csv
(383 Bytes)

I think we figured it out. We had a . rather than a comma in the first entry. Never mind!

Cell B2 needs to be a comma, not a period.  The first two lines of the dictionary remove commas and also decimal and cents if they are there.


Edited: Oops I didn't see your reply when I put mine in.  Glad you got it straightened out!

Hi Lisa,


I believe this should do the trick.



,TRUE

\..*TRUE
Annual^\d{1,2}$TRUE
Annual^1\d{2}$TRUE
Annual^2[0-4]\d$TRUE
Mid-Level^2[5-9]\d$TRUE
Mid-Level^[3-9]\d{2}$TRUE
Mid-Level^1\d{3}$TRUE
Mid-Level^2[0-4]\d{2}$TRUE
Major^((?!Annual)(?!Mid-Level).)*$TRUE


Thanks,


John

Login or Signup to post a comment