psSeedValue - cDbCJGridPromptList
Used to define a seed value for the update column when update mode is custom or non-invoking
Type: Property
Access: Read/Write
Data Type: String
Parameters: None
Syntax
Property String psSeedValue
| Access Type | Syntax |
|---|---|
| Read Access: | Get psSeedValue to StringVariable |
| Write Access: | Set psSeedValue to StringVariable/Value |
Description
When peUpdateMode is umPromptCustom or umPromptNonInvoking, you can use psSeedValue to define a seed value. This is used along with piUpdateColumn to seed the table buffer and find a record. See SeedData for a complete description of this process.
If peUpdateMode is umPromptCustom, psSeedValue will probably be set in the invoking object's Prompt_Callback event.
Procedure Prompt_Callback Integer hPrompt
String sValue
Set peUpdateMode of hPrompt to umPromptCustom
Set piUpdateColumn of hPrompt to 1 // on name column
Set phmPromptUpdateCallback of hPrompt to (RefProc(PromptUpdate))
Get Value of oMyStartForm to sValue
Set psSeedValue of hPrompt to sValue
End_Procedure
If peUpdateMode is umPromptNonInvoking, psSeedValue will probably be set inside of a custom method within the prompt object's modal panel object.
// This would be added to the prompt list's panel object.
Function GetSelectedName String sSeed String ByRef sName Returns Boolean
Boolean bCancel
String[] SelectionValues
// with non-invoking lists we store and restore the defaults manually
Send OnStoreDefaults of oSelList
Set peUpdateMode of oSelList to umPromptNonInvoking
Set piUpdateColumn of oSelList to 1
Set psSeedValue of oSelList to sSeed
Send Popup
Send OnRestoreDefaults of oSelList
Get pbCanceled of oSelList to bCancel
If not bCancel Begin
Get SelectedColumnValues of oSelList 1 to SelectionValues
If (SizeOfArray(SelectionValues)) Begin
Move SelectionValues[0] to sName
Function_Return True
End
End
Function_Return False
End_Function