modglin
Programmer
- Apr 10, 2001
- 105
I would like to sort by cigarette products, but do not want the groups to come back in Alpha order. Currently I have a formula:
if {PROD_BY_UPC.PRICE_GROUP} in ["000000001" to "000000004"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["30","31","5711"] then "3-Marl" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000005" to "000000006"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["28","29"]then "2-Basic" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000007" to "000000008"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["26","27"]then "6-Doral" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000009" to "000000012"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["36","37","5714"]then "4-Virg" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000013" to "000000016"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["40","41","5717"]then "9-Salem" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000017" to "000000020"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["38","39","5715"]then "5-Parl" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000021" to "000000024"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["32","33","5712"]then "8-Camel" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000025" to "000000028"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["34","35","5713"]then "7-Winst" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000029" to "000000032"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["24","25","5710"]then "1-Kool" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000034" to "000000035"] then "10-Monar" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000036" to "000000039"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["22","23"]then "11-Pall" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000040" to "000000043"] then "12-Newp" else "13-"
This was so it would give Kool, then Basic, then Marlboro ane etc. The end user indicated that she would like the option to choose the order. Sometimes she wants Kool,Basic,Marlboro and etc sometimes she would rather have Winston, Kool, Basic and etc. Is there a way to set up a parameter that she would choose which is 1st, 2nd, 3rd, 4th, 5th and etc?
Thanks!
if {PROD_BY_UPC.PRICE_GROUP} in ["000000001" to "000000004"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["30","31","5711"] then "3-Marl" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000005" to "000000006"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["28","29"]then "2-Basic" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000007" to "000000008"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["26","27"]then "6-Doral" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000009" to "000000012"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["36","37","5714"]then "4-Virg" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000013" to "000000016"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["40","41","5717"]then "9-Salem" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000017" to "000000020"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["38","39","5715"]then "5-Parl" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000021" to "000000024"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["32","33","5712"]then "8-Camel" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000025" to "000000028"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["34","35","5713"]then "7-Winst" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000029" to "000000032"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["24","25","5710"]then "1-Kool" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000034" to "000000035"] then "10-Monar" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000036" to "000000039"]
or {VICSRECONS_SALES_DETAIL.CODE_OR_UPC} in ["22","23"]then "11-Pall" else
if {PROD_BY_UPC.PRICE_GROUP} in ["000000040" to "000000043"] then "12-Newp" else "13-"
This was so it would give Kool, then Basic, then Marlboro ane etc. The end user indicated that she would like the option to choose the order. Sometimes she wants Kool,Basic,Marlboro and etc sometimes she would rather have Winston, Kool, Basic and etc. Is there a way to set up a parameter that she would choose which is 1st, 2nd, 3rd, 4th, 5th and etc?
Thanks!