| icSequence | input | character | database sequence name It is possible to provide extra sequences not known in the application database by extending the persistence layer class and adding a method named 'Next<icSequence>' which will be responsible for returning a unique value. |
BLF
QadFinancials
find first tSequenceList where
tSequenceList.tcSequenceName = icSequence no-error.
if not available tSequenceList
then do:
create tSequenceList.
assign tSequenceList.tcSequenceName = icSequence.
/* internal procedure overrides database access */
if can-do ({&TARGETPROCEDURE}:internal-entries,"Next":U + icsequence)
then assign tSequenceList.tcDatabaseName = "_run":U.
else
assign tSequenceList.tcDatabaseName = <M-13 GetSeqDB (input icSequence (icSequence)) in Progress>.
end.
if tSequenceList.tcDatabaseName = "_run":U
then do:
run value ("Next":U + icsequence) in {&TARGETPROCEDURE}
(output viDBV).
return viDBV.
end.
else if tSequenceList.tcDatabaseName = ""
then return ?.
else return dynamic-next-value(icSequence,tSequenceList.tcDatabaseName).