Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Day,
im very new in this Topic and i can't explain whats wrong with this tiny part of a code.
I receive the Error Message:
Semantic error
The control statement is not correctly matched with its corresponding start statement
next counter
Mtart_G is a column of a table which I've created earlier in the code
let counter = 0;
let boolean = 'false' ;
for counter = 1 to 10 //count(Mtart_G); if Mtart_G = 151 then boolean = 'true' next counter ;
Sincerely,
You need END IF
let counter = 0; let boolean = 'false' ; for counter = 1 to 10 //count(Mtart_G); if Mtart_G = 151 then boolean = 'true' END IF; next counter ;
Not really sure what you have for Mtart_G. May be you need to use it with $()
let counter = 0; let boolean = 'false' ; for counter = 1 to 10 //count(Mtart_G); if $(Mtart_G) = 151 then boolean = 'true' END IF; next counter ;
Would you be able to share a sample where I can see what you have? I am just seeing half of the script and that to without knowing your data... if you can mock up your scenario for me, I should be able to help you better
You could use the following to detect if a certain value exists within the datamodel:
let boolean = if(fieldindex('Mtart_G', 151), dual('true', 1), dual('false', 0));
If you need to check this by key-fields within a certain table you will need to ensure a certain order of your loadings or you need to load it from this table - whereby in this case the check might be already done within the origin load.
- Marcus