Send To Multiplie Statement
Posted: Monday 13 July, 2020 - 13:32
Hello, I need help in 4d Script, im doing a project in university.
I have emprical distribution with 8 values, a server where products get the label called "gate" with one of these values 1 to 8, then they go to a multi server and from there they go to 4 different "gates" according their labels. So it is simply products with value 1 and 5 go to output channel 1, with value 2 and 7 to output channel 2, etc. I need a code for sendto field in the multi server, here is what I have but with this only the last statement works, so they go only to the 4th output channel, products with other values stay in the server and dont come out.
do(
If(or(Label([gate],first(c))=1,Label([gate],first(c))=5),1),
If(or(Label([gate],first(c))=2,Label([gate],first(c))=7),2),
If(or(Label([gate],first(c))=3,Label([gate],first(c))=6),3),
If(or(Label([gate],first(c))=4,Label([gate],first(c))=8),4)
)
Could someone please help me with this? It would be a great help to me.
I have emprical distribution with 8 values, a server where products get the label called "gate" with one of these values 1 to 8, then they go to a multi server and from there they go to 4 different "gates" according their labels. So it is simply products with value 1 and 5 go to output channel 1, with value 2 and 7 to output channel 2, etc. I need a code for sendto field in the multi server, here is what I have but with this only the last statement works, so they go only to the 4th output channel, products with other values stay in the server and dont come out.
do(
If(or(Label([gate],first(c))=1,Label([gate],first(c))=5),1),
If(or(Label([gate],first(c))=2,Label([gate],first(c))=7),2),
If(or(Label([gate],first(c))=3,Label([gate],first(c))=6),3),
If(or(Label([gate],first(c))=4,Label([gate],first(c))=8),4)
)
Could someone please help me with this? It would be a great help to me.