NetTalk Central
Toggle navigation
Login
Register
×
Welcome,Guest
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
Changing record values in the PostInsert 1 Start Embed
« previous
next »
Print
Pages: [
1
]
Author
Topic: Changing record values in the PostInsert 1 Start Embed (Read 3503 times)
terryd
Hero Member
Posts: 759
Changing record values in the PostInsert 1 Start Embed
«
on:
June 02, 2010, 04:30:38 AM »
I call the following procedure routine from the PostInsert 1 Start Embed
SetClaimStatus ROUTINE !Set the value of ClaimStatus dependant on pickup value and Collection Authorisation No
WDOCREAS:Pickup = p_web.GSV('WDOCREAS:Pickup')
WCLM:CollectionAuthorisationNo = p_web.GSV('WCLM:CollectionAuthorisationNo')
IF WDOCREAS:Pickup = 0
WCLM:ClaimStatusID = 4 !Collected/Finalised
ELSE
IF WCLM:CollectionAuthorisationNo = ''
WCLM:ClaimStatusID = 2 !Authorisation O/S
ELSE
WCLM:ClaimStatusID = 3 !Waiting Colloection
END
END
p_web.SSV('WCLM:ClaimStatusID',WCLM:ClaimStatusID)
! MESSAGE('WCLM:ClaimStatusID' & WCLM:ClaimStatusID)
Exit
The value in the MESSAGE('WCLM:ClaimStatusID' & WCLM:ClaimStatusID) is correct but the value in the file after the record is saved is not changed to whatever value is in WCLM:ClaimStatusID.
Is this the right embed or is there something I am doing incorrectly?
Logged
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186
kevin plummer
Hero Member
Posts: 1195
Re: Changing record values in the PostInsert 1 Start Embed
«
Reply #1 on:
June 02, 2010, 05:56:45 AM »
try the validateInsert embed
Logged
Bruce
Global Moderator
Hero Member
Posts: 11250
Re: Changing record values in the PostInsert 1 Start Embed
«
Reply #2 on:
June 02, 2010, 07:54:09 AM »
PostInsert happens after the Insert call, so if you change the record at that point you'll need to Update it yourself.
Or, use ValidateRecord, or ValidateInsert routine to do work on the record before it is inserted.
Logged
terryd
Hero Member
Posts: 759
Re: Changing record values in the PostInsert 1 Start Embed
«
Reply #3 on:
June 05, 2010, 09:58:16 AM »
Thanks Kevin and Bruce. Working fine now
Logged
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186
Print
Pages: [
1
]
« previous
next »
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
Changing record values in the PostInsert 1 Start Embed