Hi there,
I want to have a transaction line field that is filled with a value depending on the itemid.
My journey so far:
I have made a custom transaction line field before that was picked up straight from an Item record field. So I decided to create a custom Item field first. I went to Validation & Defaulting, checked the 'formula' and put in:
CASE WHEN {itemid}="(item name)" THEN {description} ELSE {itemid} END
So this will then fill that field with whatever is in Description field if the item id is a certain phrase, otherwise it fills it with itemid. Well.. that didn't work. "invalid expression" for one item (didn't see a description field there, so may be empty?) and for another item it was simply empty (even though there was an itemid and a description.. so it should've used itemid for it).
I then decided to get rid of that whole formula and simply put {itemid} in there and it should at least put in the item id, right? Nope... nothing there. Nothing was stored in there.
Then I realized that perhaps I don't even NEED a custom field, since I could perhaps simply create a transaction line field with:
CASE WHEN {item}="(item name)" THEN {description} ELSE {item} END
.. but.. This returns "ERROR: Invalid Expression".
What am I missing and is what I'm doing the correct approach?