Dataport - Showing error Message

anilkumaranilkumar Member Posts: 136
Hi Experts!

Can any one help me in display error message in dataport, while importing data , if a field is blank.

I am unable to print in which line the problem is.

My code as follows:

IF RegStore <> '' THEN
VALIDATE("Registering Store",RegStore);
ERROR(Text000,RegStore);
IF NOT INSERT(TRUE) THEN MODIFY(TRUE);

is it possible in message I can show the error details in dataport - ?

Thanks for help in advance!
Anil Kumar Korada
Technical Consultant

Comments

  • AsallaiAsallai Member Posts: 141
    If I understood well you would like to find the incorrect line in a file?
    If it is I put a counter (integer of lines) after each record and put beside the RegStore with format to show the Error. As you know if the input parameter is blank the Error message do not show anything just stop the process.
  • SavatageSavatage Member Posts: 7,142
    anilkumar wrote:
    IF RegStore <> '' THEN
    VALIDATE("Registering Store",RegStore);
    ERROR(Text000,RegStore);
    IF NOT INSERT(TRUE) THEN MODIFY(TRUE);

    Basically you create a variable(s) that HOLDS the data to be imported.
    Say that's what "RegStore" is.

    OnBeforeImportRecord()
    CLEAR(Regstore);
    

    OnAfterImportRecord()
    IF regstore = ''
    THEN ERROR('Regstore is Blank')
    ELSE VALIDATE("Registering Store",RegStore);
    
Sign In or Register to comment.