This content has been marked as final. Show 3 replies
I have the following table:
the goal is to lookup the original parent code (i.e. Parent_Code is empty, where in this example just 1 and 2), but the Parent_Code are "Nested".
For example, Code=5's Parent_Code is 3, and 3's Parent_Code is 1, so 1 should be the "Final_Code". I want to generate the Final_Code for all the Code
I kind of know what I need to do, just not familiar with the syntax and scripting language
for i = 0 to row(table)-1
do while not empty(Parent_Code)
Lookup the ParentCode and assign it as the TemporaryFinalCode...
Does anyone has input on how to make the lookup work? or any other scripting loop may achieve this?
Thank ou so much,