I was trying to add internal notes to the purchase orders at a line level and was thought I would share a how to.
If you have a better way, please share.
- Add column to PORDERQ; YLINTEX2, Type TXC
- Save and validate table
- This is where the ID of the text will be stored at the record level, i.e. POQ~00000007, this is similar to field LINTEX
- On screen POH2
- Add column YLINTEX2, to Block 1.
- Most likely you will want this field to be hidden.
- On column NBLIG add a button action ACLOB2, description "Text internal"
- This button action will require an action parameter "CODE2", it will not be available until after save.
- Set the parameter "CODE2" to [M:POH2]YLINTEX2(nolign-2), the field that was just added.
- Save and validate the screen
- Custom code in SPEPOH
$ACTION
Case ACTION
When "ABANDON" : Gosub ABANDON # YK001 kklinger@lucidconsulting.com
When "INICRE_LIG" : Gosub INICRE_LIG # YK001 kklinger@lucidconsulting.com
When "INIMOD_LIG" : Gosub INIMOD_LIG # YK001 kklinger@lucidconsulting.com
When Default
Endcase
Return
Case ACTION
When "ABANDON" : Gosub ABANDON # YK001 kklinger@lucidconsulting.com
When "INICRE_LIG" : Gosub INICRE_LIG # YK001 kklinger@lucidconsulting.com
When "INIMOD_LIG" : Gosub INIMOD_LIG # YK001 kklinger@lucidconsulting.com
When Default
Endcase
Return
$INICRE_LIG
Gosub CHARG_TEXT_LIGNE
Gosub CHARG_TEXT_LIGNE
Return
$INIMOD_LIG
Gosub CHARG_TEXT_LIGNE
Gosub CHARG_TEXT_LIGNE
Return
$ABANDON
For I=0 To [M:POH2]NBLIG-1
If left$([M:POH2]YLINTEX2(I),3)="POQ" & [M:POH2]CREFLG(I)=0
Call SUP_CLOB([M:POH2]YLINTEX2(I),WRETOUR) From TRTX3TEX
Endif
Next I
For I=0 To [M:POH2]NBLIG-1
If left$([M:POH2]YLINTEX2(I),3)="POQ" & [M:POH2]CREFLG(I)=0
Call SUP_CLOB([M:POH2]YLINTEX2(I),WRETOUR) From TRTX3TEX
Endif
Next I
Return
$CHARG_TEXT_LIGNE
If [M:POH2]YLINTEX2(nolign-1)<>""
If left$([M:POH2]YLINTEX2(nolign-1),3)="POQ"
Call CRE_CLOB([M:POH2]YLINTEX2(nolign-1),GOK) From TRTX3TEX
If GOK<1 Return : Endif
Elsif !find(left$([M:POH2]YLINTEX2(nolign-1),3),"ITM","ITP")
Call DUP_CLOB("POQ",[M:POH2]YLINTEX2(nolign-1),GOK) From TRTX3TEX
If GOK<1 Return : Endif
Endif
[F:POQ]YLINTEX2=[M:POH2]YLINTEX2(nolign-1)
Endif
Return
If [M:POH2]YLINTEX2(nolign-1)<>""
If left$([M:POH2]YLINTEX2(nolign-1),3)="POQ"
Call CRE_CLOB([M:POH2]YLINTEX2(nolign-1),GOK) From TRTX3TEX
If GOK<1 Return : Endif
Elsif !find(left$([M:POH2]YLINTEX2(nolign-1),3),"ITM","ITP")
Call DUP_CLOB("POQ",[M:POH2]YLINTEX2(nolign-1),GOK) From TRTX3TEX
If GOK<1 Return : Endif
Endif
[F:POQ]YLINTEX2=[M:POH2]YLINTEX2(nolign-1)
Endif
Return
- Obtener enlace
- X
- Correo electrónico
- Otras aplicaciones
- Obtener enlace
- X
- Correo electrónico
- Otras aplicaciones