Foundation 6

Fnd_SqNo

21 shared methods.

Fnd_SqNo_CreateTable

Fnd_SqNo_CreateTable

Creates the

No parameters.

Fnd_SqNo_Distributor

Fnd_SqNo_Distributor

Launched as a new process from Fnd_SqNo_Get to get sequence numbers. Sequence numbers must be gotten from a new process for any process currently in a transaction.

No parameters.

Fnd_SqNo_EditGroup

Fnd_SqNo_EditGroup (record ID)

Displays a dialog for editing the specified sequence number group.

ParameterTypeDirectionDescription
idLongintinA sequence number ID

Fnd_SqNo_Editor

Fnd_SqNo_Editor

Displays the Sequence Number Editor dialog.

No parameters.

Fnd_SqNo_Enable

Fnd_SqNo_Enable (group name{; start number})

Creates the sequence number group if it doesn't already exist. Optionally starts the numbering at the specified number. Otherwise it starts at 1.

The new group will be editable by the database administrator.

Doesn't change the [Fnd_SqNo] table's read/write state.

ParameterTypeDirectionDescription
groupNameTextinThe group name
inStartNumberLongintinThe starting number (optional)

Fnd_SqNo_Fix

Fnd_SqNo_Fix (->table)

Fixeds the next number for the tables ID field by finding the highest number used so far and adding one to it.

ParameterTypeDirectionDescription
tablePtrPointerinA pointer to the table to fix

Fnd_SqNo_Get

Fnd_SqNo_Get (sequence number group name) --> Number

Returns the next available sequence number for the specified group. If the group doesn't already exist, it is created and 1 is returned as the first number.

ParameterTypeDirectionDescription
groupNameTextinThe group name
ResultLongintoutThe next number in the sequence

Fnd_SqNo_Get2

Fnd_SqNo_Get2 (group name) --> Number

Called by Fnd_SqNo_Get2 to get a sequence number.

ParameterTypeDirectionDescription
groupNameTextinThe group name
ResultLongintoutThe next number in the sequence

Fnd_SqNo_GetMany

Fnd_SqNo_GetMany (group name; how many; ->longint array)

Returns multiple sequence numbers for the specified group. If the group doesn't already exist, it is created.

ParameterTypeDirectionDescription
groupNameTextinThe group name
countLongintinThe number of numbers to return
numbersPointerinA longint array to receive the numbers

Fnd_SqNo_GetMany2

Fnd_SqNo_GetMany2 (group name; ->longint array)

Just like Fnd_SqNo_Get2, but grabs multiple numbers.

Determines how many numbers to get by the size of the array.

Assumes element 1 was filled elsewhere, and starts with element 2.

ParameterTypeDirectionDescription
groupNameTextinThe group name
numbersPointerinA longint array to receive the numbers

Fnd_SqNo_IDFieldPtr

Fnd_SqNo_IDFieldPtr (->table) --> Pointer

Returns a pointer to the specified table's ID field. Displays a bug alert if no ID field is found or specified by the hook.

ParameterTypeDirectionDescription
tablePointerinThe table in question.
ResultPointeroutA pointer to the table's key field

Fnd_SqNo_Info

Fnd_SqNo_Info (label) --> Text

Returns requested information. See the Fnd_Gen_ComponentInfo method for more information.

ParameterTypeDirectionDescription
requestTextinInfo desired ("version" or "name")
ResultTextoutResponse

Fnd_SqNo_IsInDesignGroup

Fnd_SqNo_IsInDesignGroup --> Boolean

Returns True if the current user is the Designer or in a group with a name that implies he's a designer.

ParameterTypeDirectionDescription
ResultBooleanoutTrue if the user is a Designer

Fnd_SqNo_LoadGroupRecord

Fnd_SqNo_LoadGroupRecord (group name)

Called from Fnd_SqNo_Get2 and Fnd_SqNo_GetMany2 to load the specified group record.

Creates it if it doesn't exist.

ParameterTypeDirectionDescription
groupNameTextinThe group name

Fnd_SqNo_Localize

Fnd_SqNo_Localize

Passed the localization strings to the General and (if available) Localization components.

No parameters.

Fnd_SqNo_Put

Fnd_SqNo_Put (sequence number group name; number to return)

Call this method to return a number to the specified sequence number group. If the number is higher than the current next number, it will be ignored. It will also be ignored if it's already in the list of numbers to reuse, or if the group name doesn't already exist.

This method always starts a new process to return the sequence number so the calling process doesn't have to wait for it to finish.

ParameterTypeDirectionDescription
seqNoNameTextinThe group name
seqNoNameLongintinThe number to reuse

Fnd_SqNo_Put2

Fnd_SqNo_Put2 (sequence number group name; number to return)

Called as a new process from Fnd_SqNo_Put to put a number back into the sequence number group.

ParameterTypeDirectionDescription
seqNoNameTextinThe group name
seqNoLongintinThe number to reuse

Fnd_SqNo_Set

Fnd_SqNo_Set (sequence number group name; next number)

This routine sets the next number in the sequence, and clears out any numbers in the reuse

Sets the OK variable to 1 if successful.

ParameterTypeDirectionDescription
groupNameTextinThe group name
nextSeqNoLongintinThe new next number in the sequence

Fnd_SqNo_SetRecordID

Fnd_SqNo_SetRecordID ({->table})

Assigns a sequential number to the specified table's ID field. Assumes the number will not be seen by the end user, so the number can't be returned for reuse.

If no table is specified, either the current form table or the trigger table will be used.

ParameterTypeDirectionDescription
inTablePointerinA pointer to the table for which to return a number (optional)

Fnd_SqNo_TableName

Fnd_SqNo_TableName (->table) --> Text

Returns the virtual table name if the Fnd_VS component is available. Otherwise the 4D table name is returned.

ParameterTypeDirectionDescription
tablePointerinA table
ResultTextoutThe table name to display

Fnd_SqNo_TableSeqNoName

Fnd_SqNo_TableSeqNoName (->table) --> Text

Returns the group name for the table's key field sequence number.

ParameterTypeDirectionDescription
tablePointerPointerinA table pointer
ResultTextoutThe name of the sequence number group