Line loop / check total row lines
Respondidahy i want to check the order if a value of the product master data is equal to 1 that it changes the value of the order to yes. i can do a line by line comparisation but if the last line is eg 0 it will be set to 0.
so the expected result should be :
check all line values if one line is set to 0 the order should be set to 0 .
if one line is set to 1 the orderd should be set to 1 , what is the best way to do this ?

-
Comentario oficial
Hi.
Thats not how I'd do it , I don't think thats how the Help file suggests but maybe I didn't fully understand what you mean.
Take a look at this : https://help.boyum-it.com/B1UP/index.html?lineloop.html
You need to execute a condition on the line and then call a UF (finally).
So Yeah your final UF after the condition could be something like
Set($[$BOYX_2.0.0]|1);
if you need to write the 0 value as well, you can set the final result value to 1 (e.g.) and then on the final result do "execute if condition is met" and check if the result string =1 if it does execute the set 1 otherwise run the set 0
here is a screen shot of something similar (on a different form) maybe it sheds some light

Good Luck
-
Hi,
I assume thats a UDF field on the OITM ?
basically you can do the following :
perform a lineloop on the order with a break if condition is met.
query each order line against OITM and figure out if you should break and update the field on your order or go the the next line.
Good luck .
-
So the following would be correct ?
@store1 = SQL (SELECT U_Maatartikel FROM OITM WHERE ItemCode = $[$38.1.0])
IF(@store1 = '1')
BEGIN
Set($[$BOYX_2.0.0]|1);
END
IF(@store1 = '0')
BEGIN
Set($[$BOYX_2.0.0]|0);
END
Iniciar sesión para dejar un comentario.
Comentarios
3 comentarios