Help Code Explaination

tonypangtonypang Member Posts: 101
IF NOT (Ship OR Invoice OR Receive) THEN
ERROR(
Text020,
FIELDCAPTION(Ship),FIELDCAPTION(Invoice),FIELDCAPTION(Receive));

what mean of this line of code.
Ship, Invoice and receive= boolean type

Thank you
NAV

Comments

  • idiotidiot Member Posts: 651
    2 (x + y) = 2x + 2y

    so NOT (Ship OR Invoice OR Receive) = NOT Ship OR NOT Invoice OR NOT Receive
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
  • tonypangtonypang Member Posts: 101
    TempSalesLine.SETFILTER("Shipment No.",'<>%1','');


    what mean by this line of the code?
    %1 ?


    Hope all the master can reply me.
    Thank you.
    NAV
  • tonypangtonypang Member Posts: 101
    one more line need to help

    TableIDArr[1] := DATABASE::Customer;
    Thanks
    NAV
  • David_SingletonDavid_Singleton Member Posts: 5,479
    have you read the cside developers guide? at this rate you will get the whole thing copied and pasted here.
    David Singleton
  • tonypangtonypang Member Posts: 101
    yes.
    Some of the code very difficult to understand .
    I got go through all the note.
    but i still can't understand post it here.
    Thank you so much
    NAV
  • David_SingletonDavid_Singleton Member Posts: 5,479
    tonypang wrote:
    yes.
    Some of the code very difficult to understand .
    I got go through all the note.
    but i still can't understand post it here.
    Thank you so much

    %1 is in the manuals, so you should be able to learn that from them.

    I know it can be hard, but step one is to read the manuals. If you don't want to read the books, then find a course and pay to take it.
    David Singleton
  • tonypangtonypang Member Posts: 101
    thank you.
    NAV
  • jreynoldsjreynolds Member Posts: 175
    idiot wrote:
    2 (x + y) = 2x + 2y

    so NOT (Ship OR Invoice OR Receive) = NOT Ship OR NOT Invoice OR NOT Receive
    Be careful! The associative property for multiplication and addition does not extend in the same way to negation and logical operations. Check out De Morgan's laws (http://en.wikipedia.org/wiki/De_Morgan's_laws) for the correct relationship.
  • matttraxmatttrax Member Posts: 2,309
    idiot wrote:
    so NOT (Ship OR Invoice OR Receive) = NOT Ship OR NOT Invoice OR NOT Receive

    Yeah, that actually equals NOT Ship AND NOT Invoice AND NOT Receive. The NOT negates everything, and the negative / opposite of OR is AND.

    But yes, you need to read the manuals more carefully, Tony. It's one thing if you are asking the purpose of code in the application, quite another if you are asking basic syntax questions.

    Conditionals, setting filters, array syntax....every one of them is in the application designers guide or the development coursework.

    Don't get discouraged. NAV takes a long time to learn well. Hard work will pay off.
Sign In or Register to comment.