IF-THEN code fields

I HAVE DONE IT. THANK’S FOR HELP! HI, I want to get a relation between a code field and its value. IF the value of my code field is “xy” THEN DoSomething, like print output or not. How does this works? I tried it like this: ("Posting Edited by - aurelie on 2001 Aug 08 23:11:31


IF myCodeField = 'NEWBIEQUESTION' THEN
  MESSAGE('Don''t mess around with important stuff');

:slight_smile: Edited by - SNielsen on 2001 Aug 07 07:57:23

Have your NSC give you some more training on filtering the tables and reports. First look at your report filters, there is no need to add code. Drill down and select the field “Posting Group” in the left column if not visible, then just add the Filter in the right hand colunm Print all but RAW Field “Posting Group” in the filter <>RAW Print all but Blank Field “Posting Group” in the filter <>’’ Print only RAW Field “Posting Group” in the filter RAW If you want to try code copy a standard report that nearly fits what you want When designing reports, try not to hard code a value as a selection as you will not know by looking at the report that a filter has been hard coded. View and select your Report Section then press key F9. Sample code OnPreSection() CurrReport.SHOWOUTPUT(“Posting Group” = ‘RAW’); This will only now print if the “Posting Group” has a value equal to RAW. CurrReport.SHOWOUTPUT(“Posting Group” <> ‘’); This will only now print if the “Posting Group” has a value. If your field was an option like in the Sales Order report OnPreSection() CurrReport.SHOWOUTPUT(Type = Type::Item); If you want to skip the printing of a record then try OnAfterGetRecord() IF “Posting Group” = ‘RAW’ THEN CurrReport.SKIP; IF “Posting Group” = ‘’ THEN CurrReport.SKIP; All the above could be done on filtering the report with no code David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk Edited by - David Cox on 2001 Aug 08 07:58:42