This topic contains 1 reply, has 0 voices, and was last updated by chunhong0124 7 years, 11 months ago.
-
AuthorPosts
-
December 1, 2016 at 4:19 am #23377
blitzsportHi, i have the following formula:
CASE {custitem_item_type_standard_matrix} WHEN 'Parent' THEN (CASE WHEN INSTR({displayname}, {custitem_brand}) = 0 THEN {custitem_brand} || ' ' END) || {displayname} WHEN 'Standard' THEN (CASE WHEN INSTR({displayname}, {custitem_brand}) = 0 THEN {custitem_brand} || ' ' END) || {displayname} ELSE ((CASE WHEN INSTR({displayname}, {custitem_brand}) = 0 THEN {custitem_brand} || ' ' END) || {displayname} || NVL2({custitem1}, ' – ' || {custitem1}, '') || NVL2({custitem2}, ' – ' || {custitem2}, '') || NVL2({custitem_design}, ' – ' || {custitem_design}, '') || NVL2({custitem_total_weight}, ' – ' || {custitem_total_weight}, '') || NVL2({custitem_length}, ' – ' || {custitem_length}, '') || NVL2({custitem_weapon}, ' – ' || {custitem_weapon}, '') || NVL2({custitem3}, ' – ' || {custitem3}, '')) END
Basically what this does is checks a custom field to see if the item is of type Parent, Child or Standard.
1. If its Standard or Parent then the output is the item Brand Name + Item Name.
2. If its a child item it should output Brand Name + Item Name and also with the child matrix options i.e. colour, size.
This formula works on all child items, it prefixes the brand name + item name + colour + size etc. It also works on Matrix Parent items, it prefixes the Brand Name + Item Name.
However on Standard items i get the following error: ERROR: Field 'custitem1' Not Found
Im confused as to why it would be checking the field custitem1 when 'Standard' items only check the brand and then adds the item name. Its like it skips over the Standard statement and moves to the Child statement. Can anyone see anything wrong with the code, have i missed a parenthesis. I keep checking it but cant see anything wrong.
Thanks.
Chris
This is a cached copy. Click here to see the original post. -
December 15, 2016 at 7:10 pm #23378
chunhong0124You can try to add in one more condition in the case when it is Child just as below code. Just to check if your Standard item fall into Child condition or Else condition. I suspect that your Standard items is not being label as Standard.
CASE {custitem_item_type_standard_matrix}
WHEN 'Parent' THEN …
โWHEN 'Standard' THEN …
โWHEN 'Child' THEN …
ELSE
-
AuthorPosts
You must be logged in to reply to this topic.