Help with Receipt xml <CONDITION> statement


J

Jason

Hi All,

Has anyone used a conditional statement in a receipt to print different
comments based on a value in one of the custom text fields.

For example I have the CustomText1 field configured in customers and
populated with a value to allow customers to be grouped (such as say Retail
and Wholesale customers).
I wish to print different messages on the receipts based on which group the
customer belongs to.

I am trying to use the following syntax to determine which message I should
print -

<CONDITION> Customer.CustomText1 = "Retail" </CONDITION>

The expression always seems to be evaluating to false and therefore never
prints the correct message. I understand there may be issues with string
matching but I don't know how else to group the customers ( I need to allow
for at least three classifications).

Has anyone done this or can you suggest an alternative.

Thanks,

Jason.
 
Ad

Advertisements

G

Glenn Adams [MVP - Retail Mgmt]

Create a variable and give it the value you want to compare "Retail" in this
case. You can't compare a variable value to a static value.
 
J

Jason

Hi Glenn,

Is this what you meant? Becuase I still can't get it to work :-( Any more
ideas or examples??

<SET name="RetailCustomer" custom="true" description="CustomText1 Value for
Retail Customer" type="vbString">"Retail"</SET>

<CONDITION> Customer.CustomText1=RetailCustomer </CONDITION>

Regards,

Jason.
 
Ad

Advertisements

G

Glenn Adams [MVP - Retail Mgmt]

Try adding some spaces between the values anf the tags - like this...


<SET name="RetailCustomer" custom="true" description="CustomText1 Value for
Retail Customer" type="vbString"> "Retail" </SET>

<CONDITION> Customer.CustomText1 = RetailCustomer </CONDITION>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

XML Receipt and Conditions 1
Receipt - Conditional XML 1
XML <IF> condition 1
xml Receipt help 2
Receipt XML 4
xml receipt modification 1
Receipt XML - Jeff 1
Line# in XML receipt 2

Top