doubt in TESTFIELD

rockartikrockartik Member Posts: 10
Hey Folks...

If TESTFIELD is gave with single parameter means what does it implies...?? :-k
for an example...

In the code unit no 211 Res. Jnl.-Check Line

WITH ResJnlLine DO BEGIN
IF EmptyLine THEN
EXIT;

TESTFIELD("Resource No.");
TESTFIELD("Posting Date");
TESTFIELD("Gen. Prod. Posting Group");


IF "Posting Date" <> NORMALDATE("Posting Date") THEN
FIELDERROR("Posting Date",Text000);

In the highlighted code
what it will be returned??
what if the condition is failed??

Thanks in advance :D

Comments

  • ritesh.singhritesh.singh Member Posts: 123
    It is better to look for the product help it will help you learn many other things as well :!:
    Thanks,
    Ritesh K Singh
  • DenSterDenSter Member Posts: 8,304
    You use TESTFIELD to test the value of the field. There are two parameters, the field and the value. If you only use 1 parameter (the field) then it will test to make sure it is not blank. If you provide both parameters, it tests to make sure the field has the specified value. If it doesn't have the specified value, the system shows a standard error message (field x must be <specified value> in record <primary key values>).

    Ritesh is right though, the help system contains most of this information. Go to the help menu, open the C/SIDE Reference Guide, and search for the things you want to learn about. This will give you syntax and explanations, and sometimes code samples.
  • rockartikrockartik Member Posts: 10
    I didn find any examples of using single parameter in reference manual..
    Now i understood
    Thanks Daniel.. :P
  • DenSterDenSter Member Posts: 8,304
    You're welcome, always glad to help :mrgreen:
  • MBergerMBerger Member Posts: 413
    rockartik wrote:
    I didn find any examples of using single parameter in reference manual..
    Now i understood
    Thanks Daniel.. :P
    the manual states : "...If you omit Value and the content of the field is zero or blank (empty string), the system also displays an error message."
  • DenSterDenSter Member Posts: 8,304
    He didn't say they weren't there, he said he couldn't find them
Sign In or Register to comment.