I am working through many many modules and removing 'bad' data or process and have come across a nested If formula, and cannot think of a better way to replace it.
Have a module with 2 sources MATERIAL and LABEL TYPE.
Within the material list we have several labels (FRONT, REAR, DECAL + 6 others)
In the module i need to show the label code for the appropriate label.
So i have a formula in the line item LABELCODE
If ITEM(Label Type) = Label Type.Front then Material.Front Label ELSE
If ITEM(Label Type) = Label Type.Rear then Material.Rear Label ELSE
If ITEM(Label Type) = Label Type.Decal then Material.Decal Label…
and then onwards for all 9 label types
This works perfectly but makes my eye twitch as it's not the best approach…
Two issues, one is the nested loop and the other is hard coding of label types, but I cannot think of a tidy solution?
Thanks