I would like to use conditional conection of data:
Field Origin:
Sometimes it is refering to Stock.Move(table), 1 (value), sometimes to trytonlt_anglosaxon.line_move(table), 1 (value). I would like to connect these values and to reach the value in other tables. For example: If Origin is "stock.move,1" i want to connect to 1 value in Stock Move table, if it is "trytonlt_anglosaxon.line_move,1" I want to connect other table with it's value 1.
Earlier I was using
subfield(origin,',',2) as [stock.move_value]
and it working great, but only with one type of data. Any ideas?
I don't understand what you're trying to do. Perhaps you can use mapping tables and the applymap function in an if-statement. Or perhaps you can use the LookUp function with an if-statement. You can find more information about these functions in the help file and in this document: Joins and Lookups