Hi,
4GL question.
I have a custom import template.
There are two identifiers, Header and Lines.
For Header identifier, it will always be one row in the import file.
For Lines identifier, it can have multiple dimensions (translated: it can have multiple rows with line column increment of 1000 for each row in the import file).
The Lines identifier is linked to a custom table and screen, YESD.
The import template is expected to only reads UPC Code (EANCOD) which I set Action: After Change, SPE, Always, None.
A new Subprog AM_EANCOD(VALEUR) was created for use.
For reference, this is the code I am writing on the Specific script:
[M:YESD] screen is the import's Lines identifier.
Subprog AM_EANCOD(VALEUR)
Variable Char VALEUR()
# USERADD.
Local Char DUMMYITMREF(20) : DUMMYITMREF = "YHELP"
# ENDUSERADD
If !clalev([F:ITM]) : Local File ITMMASTER[F:ITM] : Endif
Filter [F:ITM] Where [F:ITM]EANCOD = VALEUR
Read [F:ITM] First
If fstat
# Not found
#[M:YESD]ITMREF=DUMMYITMREF
[M:YESD]ITMREF=VALEUR
Else
# Found
#[M:YESD]ITMREF=[F:ITM]ITMREF
[M:YESD]ITMREF=VALEUR
Endif
Filter [F:ITM]
End
When I run the import
Question is, how to I set it to match ITMREF = EANCOD?
I have a plan B as a failsafe which is to do it on the Task Management for Batch Server's action but it will increase the UPDTICK_0 count by 1 and I would like to avoid doing it as part of the Recurring Task work since it is expected to complete in limited 120 seconds period.