Hi, i have following method:
BerekenPercentageStof(varType : Text[1];valRound : Boolean) : Decimallv_Massa := 0;
lv_TotaalMassa := 0;
lv_Resultaat := 0;
gv_GrondstofSamenStelling.RESET;
IF gv_GrondstofSamenStelling.FINDFIRST THEN BEGIN
REPEAT
lv_Item.GET(gv_GrondstofSamenStelling.Grondstof);
IF lv_Item."Item Category Code" = lv_Item."Item Category Code"::varType THEN
lv_Massa += gv_GrondstofSamenStelling.Hoeveelheid;
UNTIL gv_GrondstofSamenStelling.NEXT = 0;
END;
lv_Resultaat = lv_Massa / lv_TotaalMassa * 100;
IF valRound THEN
EXIT(ROUND(lv_Resultaat,0.001,'>'));
ELSE
EXIT(lv_Resultaat);
Now on this line i get the error when i try to save and compile saying me that 'Isnt an allowed option'
How should i check if the just retrieved item his Item category code, equals the varType : Text[1];
0
Comments
I guess your question is about this line: The double colon is used to evaluate option values, and the Item Category Code is not an option value. I'm not quite sure what you want to accomplish, but if you are going to compare values, those values need to be the same data type. So with the Item Category Code field being a Code10 type field, you will need to change the parameter to also be a Code10 type. Then in your code it should then say something like this:
RIS Plus, LLC