![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 4 of 4 total |
![]() |
Mon, Jan 11 2021 7:52 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Before I report it as a bug, and because it may be my misunderstanding of when/how events fire
In a table AfterPost event I have some code which references the primary key of the table dm.DB.Execute('UPDATE Ledger SET _fkSlips = ' + IntToStr(Slips_ID.AsInteger) + ', _fkBanks = ' + IntToStr(GetBankAccount.Tag) + ' WHERE _ID IN (' + RowList.CommaText + ')'); Unfortunately when the AfterPost event fires NONE of the fields in the Slips table seem to have been populated. Does this seem right? Roy Lambert |
Mon, Jan 11 2021 8:54 AM | Permanent Link |
Raul ![]() | On 1/11/2021 7:52 AM, Roy Lambert wrote:
> In a table AfterPost event I have some code which references the primary key of the table > > dm.DB.Execute('UPDATE Ledger SET _fkSlips = ' + IntToStr(Slips_ID.AsInteger) + ', _fkBanks = ' + IntToStr(GetBankAccount.Tag) + ' WHERE _ID IN (' + RowList.CommaText + ')'); > > Unfortunately when the AfterPost event fires NONE of the fields in the Slips table seem to have been populated. Does this seem right? AfterPost AFAIK fires for given table after data is actually saved available for use (and table would be in browser state again). However, i'm bit confused about the SQL you're executing - it does not reference Slips table at all !? Raul |
Mon, Jan 11 2021 10:30 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Raul
>AfterPost AFAIK fires for given table after data is actually saved >available for use (and table would be in browser state again). Following much head scratching I've come to the conclusion that its, yet again, me. Its been a while since I've been working on this bit of code and I forgot I had a filter in place. As soon as its posted the record gets whisked away. I now have the fun of trying to find the right places to unfilter and refilter ![]() >However, i'm bit confused about the SQL you're executing - it does not >reference Slips table at all !? IntToStr(Slips_ID.AsInteger) <<<<<<<<<<< Roy |
Mon, Jan 11 2021 2:59 PM | Permanent Link |
Raul ![]() | On 1/11/2021 10:30 AM, Roy Lambert wrote:
> Following much head scratching I've come to the conclusion that its, yet again, me. Its been a while since I've been working on this bit of code and I forgot I had a filter in place. As soon as its posted the record gets whisked away. I now have the fun of trying to find the right places to unfilter and refilter ![]() makes sense > > IntToStr(Slips_ID.AsInteger) <<<<<<<<<<< Ok - that looks like a variable or maybe a field reference. OP referenced "Slips table" so i was looking for table reference in the sql. Raul |
This web page was last updated on Thursday, July 10, 2025 at 10:36 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |