Auto incremented number workflow
I am looking for a workflow that looks to a table for the next available auto-incremented number and then grabs that number, increments it in the table for the next guy, and populates a form with it. If anyone has a workflow that is doing that kind of thing and is willing to share, I'd be grateful. Post here or contact me directly. Thanks.
-
Hi Jim,
You probably figured this out already, but I'll post for posterity. If your data is in an RDBMS, the easiest thing to do is use the SQL Query activity with the query SELECT MAX([AutoIncrementField]) + 1 FROM YourTable. The value can be assigned to an integer variable using CInt(datatablename.Rows(0)(0)), after assigning the datatable's name first. I think the Query Task could also be used to do something similar.
We've been using SQL triggers to keep assigment of incrementing fields totally hands off.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar