whoopsie - NEXT is a bad idea if you just want the autonum value -
because it increments the Autonum counter
Doug
On 12/8/2022 10:56 AM, Doug Hamilton wrote:
Dan - two other options might be:
1) If you're trying to get the next autonumber value, the NEXT
function:(NEXT(tblname,autonumcol)) Returns the next value of an
autonumbered
<https://www.rbase.com/support/rsyntax/rbgx5/autonum.html> column.
Subtract 1 to get the last assigned number.
See: https://www.rbase.com/support/rsyntax/rbgx5/next_functions_3.html
2) MAX function: SELECT MAX(ColumnName) FROM TableName
You might need to consider how many users are adding rows to the table
to make sure you get the right number.
Doug
On 12/8/2022 9:45 AM, A. Razzak Memon wrote:
Dan,
SET VAR vLastValue INTEGER = 0
SELECT colname INTO vLastValue INDIC iv1 FROM tablename WHERE COUNT =
INSERT
Alternatively, you could also try:
SET VAR vLastValue INTEGER = 0
SELECT colname INTO vLastValue INDIC iv1 FROM tablename WHERE COUNT =
LAST
Hope it helps!
Very Best R:egards,
Razzak
On 12/8/2022 10:34 AM, Dan Goldberg wrote:
I am trying to capture an autonumber field value in the after start
eep but it keeps showing 0. So I put the variable field on the form
so I can watch it(circled red). But when I step thru it I see the
variable value in the form but not in the eep. Is there a better way
after a form start and when a row is save to get the current
autonumber value when those are triggered? TIA
Dan Goldberg
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/BY3PR19MB5027F39DE5DF0671E6E6873BD41D9%40BY3PR19MB5027.namprd19.prod.outlook.com
<https://groups.google.com/d/msgid/rbase-l/BY3PR19MB5027F39DE5DF0671E6E6873BD41D9%40BY3PR19MB5027.namprd19.prod.outlook.com?utm_medium=email&utm_source=footer>.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/436f1de3-b28b-42e1-872d-4ba5fec406e8%40rbase.com
<https://groups.google.com/d/msgid/rbase-l/436f1de3-b28b-42e1-872d-4ba5fec406e8%40rbase.com?utm_medium=email&utm_source=footer>.
------------------------------------------------------------------------
Avast logo <https://www.avast.com/antivirus>
This email has been checked for viruses by Avast antivirus software.
www.avast.com <https://www.avast.com/antivirus>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/c025e046-ce92-0cf8-b9f1-2dc21e4c3489%40wi.rr.com
<https://groups.google.com/d/msgid/rbase-l/c025e046-ce92-0cf8-b9f1-2dc21e4c3489%40wi.rr.com?utm_medium=email&utm_source=footer>.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/812fc3be-0dbf-5e17-1c6a-06a41658d1a4%40wi.rr.com.