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>
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>