Receipt XML


E

Ed Raney

I am attempting to have a gift receipt that prints only the items with the
GIFT Sales Rep assigned. I understand that you cannot do an IF statement to
compare a
variable against a string. Instead you have to compare the variable to
another
variable which contains the string you're checking for. This seems to work
for Entry.Item.ItemLookupCode but always returns true for Entry.SalesRep.Name.

Any ideas?

<!--
I am attempting to have a gift receipt that prints only the items with the
GIFT Sales Rep assigned
The code segment for Entry.SalesRep.Name always returns true which is not
correct
-->
<SET name="GiftRep" type="vbString"> "GIFT" </SET>
<FOR each="entry">
<IF> <CONDITION>Entry.SalesRep.Name = GiftRep</CONDITION>
<THEN>
<ROW> Entry.Item.ItemLookupCode "|" Entry.Item.Description "|"
"XXXXX" </ROW>

</THEN>
</IF>
</FOR>


<!--
The code segment for ItemLookupCode works as expected
-->
<SET name="MyString" type="vbString"> "GC" </SET>

<FOR each="entry">
<IF> <CONDITION>Entry.Item.ItemLookupCode = MyString</CONDITION>

<THEN>
<ROW> Entry.Item.ItemLookupCode "|" Entry.Item.Description "|" "SAMPLE"
</ROW>

</THEN>
</IF>
</FOR>
 
Ad

Advertisements

J

Jeff @ Check Point Software

Ed,

I'm pretty sure that can't be done.




I am attempting to have a gift receipt that prints only the items with the
GIFT Sales Rep assigned. I understand that you cannot do an IF statement to
compare a
variable against a string. Instead you have to compare the variable to
another
variable which contains the string you're checking for. This seems to work
for Entry.Item.ItemLookupCode but always returns true for Entry.SalesRep.Name.

Any ideas?

<!--
I am attempting to have a gift receipt that prints only the items with the
GIFT Sales Rep assigned
The code segment for Entry.SalesRep.Name always returns true which is not
correct
-->
<SET name="GiftRep" type="vbString"> "GIFT" </SET>
<FOR each="entry">
<IF> <CONDITION>Entry.SalesRep.Name = GiftRep</CONDITION>
<THEN>
<ROW> Entry.Item.ItemLookupCode "|" Entry.Item.Description "|"
"XXXXX" </ROW>

</THEN>
</IF>
</FOR>


<!--
The code segment for ItemLookupCode works as expected
-->
<SET name="MyString" type="vbString"> "GC" </SET>

<FOR each="entry">
<IF> <CONDITION>Entry.Item.ItemLookupCode = MyString</CONDITION>

<THEN>
<ROW> Entry.Item.ItemLookupCode "|" Entry.Item.Description "|" "SAMPLE"
</ROW>

</THEN>
</IF>
</FOR>
 
A

Afshin

Onlny way is to do this with a special development. If interested contat
me.

Afshin Alikhani - (e-mail address removed)
Retail Realm
= = = = = = = = = = =
 
E

Ed Raney

Hi Jeff,

Do you know why it can not be done? The condition check works for the
ItemLookupCode.

Thank you,
Ed
 
Ad

Advertisements

E

Ed Raney

Hi Afshin,

Thank you very much for the tip of defining the GiftRep as a double and
comparing it to a string. This seems to work in the tests performed thus far.

Thank you,
Ed

=====================================

Dear Ed,

If you want the receipt to work change this. The variable
Entry.Salesrep.Name is empty. Hence it is not working. We need to use the
variable Entry.Salerep.Number.
Please see the code below.

<FOR each="entry">
<SET name="GiftRep" type="vbDouble"> 1 </SET>
<IF>
<CONDITION>Entry.Salesrep.Number = GiftRep </CONDITION>
<THEN>
<ROW>
Entry.Item.ItemLookupCode "|"
Entry.Item.Description "|" "XXXX"
</ROW>
</THEN>
</IF>
</FOR>

Regards
Afshin
 

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 modification 1
XML Receipt and Conditions 1
Receipt XML - Jeff 1
Line# in XML receipt 2
xml Receipt help 2
receipt templates - xml 5
Editing Receipt - XML 3
XML/ Receipt Customization 1

Top