Unique Values and the Remote Rules Service API
If a table contain a key column for which the domain has the 'Generate unique value' flag set, when a new row is inserted into in this table the Rules Engine automatically generates a new unique value for that key column.
If you are in client/server mode, you can see this new value directly after inserting the row. But if you are using the Remote Rules Service API or the RulesService, the underlying protocol (ODBC or JDBC) which allows you to communicate with the Rules Engine does not provide an 'update notify' mechanism, so that you cannot see the new value for your key. It is then quite difficult to retrieve the row that you have just inserted since you do not know its key.
To work around this problem, USoft provides you a simple mechanism: the Rules Engine keeps the last unique value it has generated, and this value can be retrieved by issuing the following SQL statement:
The Rules Engine only retains the generated value of the last insert statement sent by the user (not from other insert statements due to cascading constraints).