I tried to get the value from a drop-down option list on a form. The compile error is “You cannot enter ‘Exclude’ in Option (the cursor is in front of the invalid character)”. IsForecast is a 10 digits text variable while Forecast is a option variable for the drop-down list with three options: Exclude, Only and Include. IF IsForecast = Forecast::Exclude THEN something… I also tried this IF Forecast = 0 THEN something… It can be compiled but no value been passed.
Hi try this way IF Forecast = Forecast::Exclude THEN something… kumar
I did try this. Same compile error pop up.
To me it sounds like “Exclude” is a reserved word. However, I don’t recall this word as reserved. Try changing the option to “Excluded” instead. Lars Strøm Valsted ------------------------- Software development today is a race between the programmers trying to make better and more foolproof programs, and the universe trying to make bigger idiots. So far the universe is winning.
try: Isforecast := format(Forecast::Exclude); . . if IsForecast = “Exclude” then something
Similar task I solved with the following C/AL code: OnPush() CASE SheetColumns OF SheetColumns::“G/L Accounts” : combination := 1; SheetColumns::Period : combination := 2; etc… // [ELSE <Statement n+1>] END; CASE SheetRows OF SheetRows::“G/L Accounts” : combination := combination100<here,plus sign>1; SheetRows::Period : combination := combination100<here,plus sign>2; etc … // [ELSE <Statement n+1>] END; // here, I deal with the produced two-dimensional combination GenCombination(); Regarda
I would check the contents of Forecast during run. Comment the line “IF ForeCast…” and set IF CONFIRM(‘Forecast : %1’, TRUE, ForeCast) THEN; infront. So you can see which contents the variable has. Perhaps that helps you find the error. Stefan Weinreich Billing Analyst
I have tried “IF Forecast = 0 THEN” again and it worked fine. Something else was wrong rather than this statement. Thanks all of you.