Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IDSSPrompt Interface Reference

Inherited by IDSSPrompt2.

List of all members.


Detailed Description

We assume that the reader is familiar with the Usage of Prompts document.

The usage of this interface is explained there.

In this document we use prompt object to refer to a prompt obtained directly from the Object Server. We use prompt instance to refer to the wrapper on a prompt object generated by an application object that uses a prompt object. We use prompt question to refer to the wrapper on a prompt object generated by a resolution object when the prompt is to given to a user.


Public Member Functions

HRESULT Answer ([in] VARIANT *pAnswer)
 The value selected as the answer to this prompt (default).
HRESULT Answer ([out, retval] VARIANT *pAnswer)
 The value selected as the answer to this prompt (default).
HRESULT AnswerList ([in] VARIANT *pAnswerList)
 List of proposed answers for the prompt.
HRESULT AnswerList ([out, retval] VARIANT *pAnswerList)
 List of proposed answers for the prompt.
HRESULT Auxiliary ([in] VARIANT *pAuxiliary)
 Auxiliary validation property.
HRESULT Auxiliary ([out, retval] VARIANT *pAuxiliary)
 Auxiliary validation property.
HRESULT AuxiliaryExports ([out, retval] IDSSExports ppExports)
 Exports from this prompt into its Auxiliary value.
HRESULT AuxiliaryPrompt ([in] IDSSPrompt *pPrompt)
 Used if the Auxiliary value is itself a prompt.
HRESULT AuxiliaryPrompt ([out, retval] IDSSPrompt ppPrompt)
 Used if the Auxiliary value is itself a prompt.
HRESULT Closed ([in] VARIANT_BOOL Closed)
 True if this prompt has been answered.
HRESULT Closed ([out, retval] VARIANT_BOOL *pClosed)
 True if this prompt has been answered.
HRESULT Default ([in] VARIANT *pDefault)
 The value to which the prompt defaults.
HRESULT Default ([out, retval] VARIANT *pDefault)
 The value to which the prompt defaults.
HRESULT ExportsToPrompt ([out, retval] IDSSExports ppExports)
 Collection of prompts exported into this prompt instance.
HRESULT HasPrevious ([out, retval] VARIANT_BOOL *pHasPrevious)
 True for a question that records a Previous answer.
HRESULT Importable ([in] VARIANT_BOOL Importable)
 True if this prompt may be replaced by one imported from outside.
HRESULT Importable ([out, retval] VARIANT_BOOL *pImportable)
 True if this prompt may be replaced by one imported from outside.
HRESULT ImportAs ([in] IDSSPrompt *pImportAs)
 Specifies the prompt object to be imported to replace this prompt.
HRESULT ImportAs ([out, retval] IDSSPrompt ppImportAs)
 Specifies the prompt object to be imported to replace this prompt.
HRESULT Incomplete ([out, retval] VARIANT_BOOL *pIncomplete)
 True if there are unanswered prompts in the validation properties.
HRESULT Index ([in] Int32 Index)
 The position of this prompt instance in its collection.
HRESULT Index ([out, retval] Int32 *pIndex)
 The position of this prompt instance in its collection.
HRESULT Info ([out, retval] IDSSObjectInfo ppInfo)
 The usual IDSSObjectInfo interface on a prompt object.
HRESULT IsEquivalentAnswer ([in] IDSSPrompt *pPrompt,[in, defaultvalue(0)] VARIANT_BOOL DeepCompare,[out, retval] VARIANT_BOOL *pEquilalent)
 Test if the answer to this prompt is same as answer to other prompt.
HRESULT Locations ([out, retval] IDSSPromptLocations ppLocations)
 Collection of all the objects (in the report) that contain this prompt.
HRESULT Locked ([out, retval] VARIANT_BOOL *pLocked)
 True if the prompt's answer cannot be modified any more.
HRESULT Maximum ([in] VARIANT *pMaximum)
 A value used as an upper bound to validate an answer to the prompt.
HRESULT Maximum ([out, retval] VARIANT *pMaximum)
 A value used as an upper bound to validate an answer to the prompt.
HRESULT MaximumExports ([out, retval] IDSSExports ppExports)
 Exports from this prompt into its Maximum value.
HRESULT MaximumPrompt ([in] IDSSPrompt *pPrompt)
 Used if the Maximum value is itself a prompt.
HRESULT MaximumPrompt ([out, retval] IDSSPrompt ppPrompt)
 Used if the Maximum value is itself a prompt.
HRESULT Meaning ([in] BSTR Meaning)
 A long string used to define the meaning of a prompt in a context.
HRESULT Meaning ([out, retval] BSTR *pMeaning)
 A long string used to define the meaning of a prompt in a context.
HRESULT Merge ([in] VARIANT_BOOL Merge)
 True means merge this instance with other instances of this prompt.
HRESULT Merge ([out, retval] VARIANT_BOOL *pMerge)
 True means merge this instance with other instances of this prompt.
HRESULT Minimum ([in] VARIANT *pMinimum)
 A value used as a lower bound to validate an answer to the prompt.
HRESULT Minimum ([out, retval] VARIANT *pMinimum)
 A value used as a lower bound to validate an answer to the prompt.
HRESULT MinimumExports ([out, retval] IDSSExports ppExports)
 Exports from this prompt into its Minimum value.
HRESULT MinimumPrompt ([in] IDSSPrompt *pPrompt)
 Used if the Minimum value is itself a prompt.
HRESULT MinimumPrompt ([out, retval] IDSSPrompt ppPrompt)
 Used if the Minimum value is itself a prompt.
HRESULT Origin ([in] VARIANT *pOrigin)
 A value used as a basis for an answer to the prompt.
HRESULT Origin ([out, retval] VARIANT *pOrigin)
 A value used as a basis for an answer to the prompt.
HRESULT OriginExports ([out, retval] IDSSExports ppExports)
 Exports from this prompt into its Origin value.
HRESULT OriginPrompt ([in] IDSSPrompt *pPrompt)
 Used it the Origin value is itself a prompt.
HRESULT OriginPrompt ([out, retval] IDSSPrompt ppPrompt)
 Used it the Origin value is itself a prompt.
HRESULT Populate ([in] IDSSPrompt *pOriginal)
 This method acts like an assignment operator in C++.
HRESULT Previous ([out, retval] VARIANT *pPrevious)
 The answer, if known, given last time the prompt was resolved.
HRESULT Prompts ([out, retval] IDSSPrompts ppPrompts)
 The collection of prompt instances used in this prompt.
HRESULT PromptType ([in] EnumDSSPromptType PromptType)
 The type of data that is used to answer this prompt.
HRESULT PromptType ([out, retval] EnumDSSPromptType *pPromptType)
 The type of data that is used to answer this prompt.
HRESULT Restriction ([in] VARIANT *pRestriction)
 A value used as a restriction to validate an answer to the prompt.
HRESULT Restriction ([out, retval] VARIANT *pRestriction)
 A value used as a restriction to validate an answer to the prompt.
HRESULT RestrictionExports ([out, retval] IDSSExports ppExports)
 Exports from this prompt into its Restriction value.
HRESULT RestrictionPrompt ([in] IDSSPrompt *pPrompt)
 Used it the Restriction value is itself a prompt.
HRESULT RestrictionPrompt ([out, retval] IDSSPrompt ppPrompt)
 Used it the Restriction value is itself a prompt.
HRESULT Reuse ([in] EnumDSSPromptReuse Reuse)
 Defaulting strategy used if a previous value of the prompt is known.
HRESULT Reuse ([out, retval] EnumDSSPromptReuse *pReuse)
 Defaulting strategy used if a previous value of the prompt is known.
HRESULT Title ([in] BSTR Title)
 A short string used, in context, to title the prompt.
HRESULT Title ([out, retval] BSTR *pTitle)
 A short string used, in context, to title the prompt.
HRESULT Used ([out, retval] VARIANT_BOOL *pUsed)
 True if this prompt is known to be used somewhere in the resolution.


Member Function Documentation

HRESULT IDSSPrompt::Answer [in] VARIANT *  pAnswer  ) 
 

The value selected as the answer to this prompt (default).

This is the default property of the interface.

Answer is a read/write variant property. It is used to contain the value (usually called an answer) that is substituted in for this prompt. The type of the answer depends on the PromptType. This property is used on a prompt question it contains the answer for the question. For an open question it is the answer that would be selected if the user were to decline to answer the prompt. For a closed question it is the actual answer to the question. A user can write to this property directly, or call methods on an object taken from this property to either set, or change the answer.
Answering a prompt with Empty is usually valid as an answer (we call it canceling the prompt). Depending on how the answer is used, it may, or may not, break the resolution process. It indicates that the user wishes to delete whatever parts of the report contained prompt instances that correspond to this question. The Reuse property can be set to make the prompt reject this answer.
We always accept P.Answer = P.Default" and "P.Answer = P.Previous, even if the value in the Default / Previous property would not normally be accepted as an argument. The implementation has to compare IUnknown pointers to detect this usage. Of course if these properties are not pointer-valued then the value is just copied into the answer in the usual manner.
Parameters:
pAnswer The new value for the Answer. Acceptable values depend on the PromptType. A reference to the Default variant, or the Previous variant is always okay. Empty is acceptable for all types of prompts.
pAnswer The value of the Answer property. Always returns Empty if called on a prompt object.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_PROMPT_LOCKED The question cannot be edited because it is locked.
  • OBJSVR_E_PROMPT_INCOMPLETE The question cannot be edited because it is incomplete.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.
  • OBJSVR_E_NEED_QUESTION Cannot set an Answer on a prompt object / instance.
  • OBJSVR_E_BAD_PROMPT_CANCEL The Reuse setting of this prompt states that the prompt has to be answered. Empty is rejected.
  • OBJSVR_E_BAD_ANSWER Returned if answer fails validation requirements.

HRESULT IDSSPrompt::Answer [out, retval] VARIANT *  pAnswer  ) 
 

The value selected as the answer to this prompt (default).

This is the default property of the interface.

Answer is a read/write variant property. It is used to contain the value (usually called an answer) that is substituted in for this prompt. The type of the answer depends on the PromptType. This property is used on a prompt question it contains the answer for the question. For an open question it is the answer that would be selected if the user were to decline to answer the prompt. For a closed question it is the actual answer to the question. A user can write to this property directly, or call methods on an object taken from this property to either set, or change the answer.
Answering a prompt with Empty is usually valid as an answer (we call it canceling the prompt). Depending on how the answer is used, it may, or may not, break the resolution process. It indicates that the user wishes to delete whatever parts of the report contained prompt instances that correspond to this question. The Reuse property can be set to make the prompt reject this answer.
We always accept P.Answer = P.Default" and "P.Answer = P.Previous, even if the value in the Default / Previous property would not normally be accepted as an argument. The implementation has to compare IUnknown pointers to detect this usage. Of course if these properties are not pointer-valued then the value is just copied into the answer in the usual manner.
Parameters:
pAnswer The new value for the Answer. Acceptable values depend on the PromptType. A reference to the Default variant, or the Previous variant is always okay. Empty is acceptable for all types of prompts.
pAnswer The value of the Answer property. Always returns Empty if called on a prompt object.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_PROMPT_LOCKED The question cannot be edited because it is locked.
  • OBJSVR_E_PROMPT_INCOMPLETE The question cannot be edited because it is incomplete.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.
  • OBJSVR_E_NEED_QUESTION Cannot set an Answer on a prompt object / instance.
  • OBJSVR_E_BAD_PROMPT_CANCEL The Reuse setting of this prompt states that the prompt has to be answered. Empty is rejected.
  • OBJSVR_E_BAD_ANSWER Returned if answer fails validation requirements.

HRESULT IDSSPrompt::AnswerList [in] VARIANT *  pAnswerList  ) 
 

List of proposed answers for the prompt.

AnswerList is a read/write variant property. It records a list of possible answers for the prompt. The intention is that the user could be invited to select from the answer list, instead of using the validation properties to derive a list of objects by running a search or loading elements.

The answer list is used accessed in same manner as the Default property. It can hold a collection of objects (for choose objects prompt) or a collection of elements (for chose elements prompt). We do not support an answer list for other types of prompts.
This property is part of the definition of a prompt object. A designer may specify an answer list when constructing a prompt. It cannot be modified from a prompt instance or a prompt question.
Parameters:
pAnswerList New value for this property. Empty is always acceptable, other values depend on PromptType.
pAnswerList The AnswerList value for this prompt object.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.

HRESULT IDSSPrompt::AnswerList [out, retval] VARIANT *  pAnswerList  ) 
 

List of proposed answers for the prompt.

AnswerList is a read/write variant property. It records a list of possible answers for the prompt. The intention is that the user could be invited to select from the answer list, instead of using the validation properties to derive a list of objects by running a search or loading elements.

The answer list is used accessed in same manner as the Default property. It can hold a collection of objects (for choose objects prompt) or a collection of elements (for chose elements prompt). We do not support an answer list for other types of prompts.
This property is part of the definition of a prompt object. A designer may specify an answer list when constructing a prompt. It cannot be modified from a prompt instance or a prompt question.
Parameters:
pAnswerList New value for this property. Empty is always acceptable, other values depend on PromptType.
pAnswerList The AnswerList value for this prompt object.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.

HRESULT IDSSPrompt::Auxiliary [in] VARIANT *  pAuxiliary  ) 
 

Auxiliary validation property.

Auxiliary is a read/write variant property. It is a validation property of a prompt; that is its value is used to validate an answer to the prompt. The meaning of this property depends on PromptType. In fact, we do not permit this property to be set until after PromptType has been set.

For a prompt instance this property always returns the same value as on the underlying prompt object. For a prompt question it returns the resolved value of this property.
The resolved value of the property is usually the same as the value of the property on the underlying prompt object. However if the Auxiliary property is either supplied as a prompt (i.e. AuxiliaryPrompt is set), or contains a prompt then the resolution server attempts to resolve the Auxiliary property by substituting answers to the embedded prompts. If it succeeds then the Auxiliary property on the prompt question returns the resolved value. It cannot do this if one or more of the embedded prompts are not closed, in which case the prompt question is marked as Incomplete instead and Auxiliary returns the value from the prompt object.
Parameters:
pAuxiliary New value for this property. Empty is always acceptable, other values depend on PromptType.
pAuxiliary The Auxiliary value for this prompt object/instance. The resolved auxiliary value for a prompt question.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance / question.
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.

HRESULT IDSSPrompt::Auxiliary [out, retval] VARIANT *  pAuxiliary  ) 
 

Auxiliary validation property.

Auxiliary is a read/write variant property. It is a validation property of a prompt; that is its value is used to validate an answer to the prompt. The meaning of this property depends on PromptType. In fact, we do not permit this property to be set until after PromptType has been set.

For a prompt instance this property always returns the same value as on the underlying prompt object. For a prompt question it returns the resolved value of this property.
The resolved value of the property is usually the same as the value of the property on the underlying prompt object. However if the Auxiliary property is either supplied as a prompt (i.e. AuxiliaryPrompt is set), or contains a prompt then the resolution server attempts to resolve the Auxiliary property by substituting answers to the embedded prompts. If it succeeds then the Auxiliary property on the prompt question returns the resolved value. It cannot do this if one or more of the embedded prompts are not closed, in which case the prompt question is marked as Incomplete instead and Auxiliary returns the value from the prompt object.
Parameters:
pAuxiliary New value for this property. Empty is always acceptable, other values depend on PromptType.
pAuxiliary The Auxiliary value for this prompt object/instance. The resolved auxiliary value for a prompt question.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance / question.
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.

HRESULT IDSSPrompt::AuxiliaryExports [out, retval] IDSSExports   ppExports  ) 
 

Exports from this prompt into its Auxiliary value.

AuxiliaryExports is a read-only collection property. It returns the collection of exports from this prompt object into the value held in the Auxiliary property. This collection can only be edited at the prompt object level, although it can be accessed from a prompt instance, or a prompt question. If the designer chooses to define the Auxiliary property as an object that contains prompts then the designer can use this collection to export prompts into the object.

Some types of prompts do not have an Auxiliary value. For these types of prompts there is no AuxiliaryExports collection.
Reading this property on a prompt instance or a prompt question will always return the same collection as on the underlying prompt object. This is true even if the prompt concerned has been closed, and so we now know the value of the prompt.
Parameters:
ppExports The collection of Export objects. NULL if PromptType indicates that there is no Auxiliary property, or if PromptType has not yet been set
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSPrompt::AuxiliaryPrompt [in] IDSSPrompt pPrompt  ) 
 

Used if the Auxiliary value is itself a prompt.

AuxiuliaryPrompt is a read/write prompt property. Auxiliary is one of the validation properties of a prompt - it contains a value that is used to restrict the set of acceptable answers to a prompt. The acceptable type of this property depends on the type of the prompt. If a designer wishes to specify that the Auxiliary value is supplied as the answer of another prompt, then the designer uses this property to specify which prompt should be used.

This property can only be modified at the prompt object level, although the value it contains can be read at any level. The value returned by this prompt is a prompt instance in the prompt's prompt instance collection. However the property can be set to a prompt object, which adds a new instance to the collection, if the chosen prompt was not already in it.
Setting this property causes Auxiliary to be set to Empty and the AuxiliaryExports collection to be cleared since the auxiliary value must either be supplied as a prompt, or as an explicit value with possible exports. If the PromptType indicates that there is no Auxiliary property then setting AuxiliaryPrompt to anything other than NULL returns an error.
Setting this property on anything other than a prompt object always returns an error.
Reading this property on a prompt instance or a prompt question always returns the same value as on the underlying prompt object. This is true even if the prompt concerned has been closed, and so we now know the value of the prompt.
Parameters:
pPrompt A reference to the prompt that should be used to obtain the Auxiliary value. Must be either the prompt object, or a prompt instance in the collection of prompts used by this object. NULL = the Auxiliary value is not obtained from a prompt.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.

HRESULT IDSSPrompt::AuxiliaryPrompt [out, retval] IDSSPrompt   ppPrompt  ) 
 

Used if the Auxiliary value is itself a prompt.

AuxiuliaryPrompt is a read/write prompt property. Auxiliary is one of the validation properties of a prompt - it contains a value that is used to restrict the set of acceptable answers to a prompt. The acceptable type of this property depends on the type of the prompt. If a designer wishes to specify that the Auxiliary value is supplied as the answer of another prompt, then the designer uses this property to specify which prompt should be used.

This property can only be modified at the prompt object level, although the value it contains can be read at any level. The value returned by this prompt is a prompt instance in the prompt's prompt instance collection. However the property can be set to a prompt object, which adds a new instance to the collection, if the chosen prompt was not already in it.
Setting this property causes Auxiliary to be set to Empty and the AuxiliaryExports collection to be cleared since the auxiliary value must either be supplied as a prompt, or as an explicit value with possible exports. If the PromptType indicates that there is no Auxiliary property then setting AuxiliaryPrompt to anything other than NULL returns an error.
Setting this property on anything other than a prompt object always returns an error.
Reading this property on a prompt instance or a prompt question always returns the same value as on the underlying prompt object. This is true even if the prompt concerned has been closed, and so we now know the value of the prompt.
Parameters:
ppPrompt A prompt instance from the collection of prompts in this object. NULL if this property is not set to a prompt
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.

HRESULT IDSSPrompt::Closed [in] VARIANT_BOOL  Closed  ) 
 

True if this prompt has been answered.

Closed is a read/write Boolean property of prompt questions. It is set to True if and only if the resolution object considers the question to have been answered. A user can answer the question by either modifying the Answer property, or by directly setting this property to True. (We call the latter action Declining the Prompt.) A user can also set this property to False to reopen a question.

Normally a question is created with Closed set to False. It is possible for a question to be listed as closed from the start because either:
  • An answer to the prompt is included in the definition of the prompt instance.
  • The question has a previous value, and its Reuse property specifies that it should not be prompted again.
This property always returns False (without error) for prompt objects and prompt instances. However if a user attempts to assign it for anything other than a prompt object we return an error.
Parameters:
Closed New value for the property
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_PROMPT_LOCKED The question cannot be opened because it is locked.
  • OBJSVR_E_PROMPT_INCOMPLETE The question cannot be closed because it is incomplete.
  • OBJSVR_E_NEED_QUESTION This action cannot be performed on a prompt object or prompt instance. Returned if an attempt is made to write to the property on a prompt object or instance.
  • OBJSVR_E_BAD_PROMPT_CANCEL The question cannot be closed because its Reuse property tells it to break rather than permit itself to be canceled.

HRESULT IDSSPrompt::Closed [out, retval] VARIANT_BOOL *  pClosed  ) 
 

True if this prompt has been answered.

Closed is a read/write Boolean property of prompt questions. It is set to True if and only if the resolution object considers the question to have been answered. A user can answer the question by either modifying the Answer property, or by directly setting this property to True. (We call the latter action Declining the Prompt.) A user can also set this property to False to reopen a question.

Normally a question is created with Closed set to False. It is possible for a question to be listed as closed from the start because either:
  • An answer to the prompt is included in the definition of the prompt instance.
  • The question has a previous value, and its Reuse property specifies that it should not be prompted again.
This property always returns False (without error) for prompt objects and prompt instances. However if a user attempts to assign it for anything other than a prompt object we return an error.
Parameters:
pClosed True if we consider the question to have been answered Always False for a prompt object or instance
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_PROMPT_LOCKED The question cannot be opened because it is locked.
  • OBJSVR_E_PROMPT_INCOMPLETE The question cannot be closed because it is incomplete.
  • OBJSVR_E_NEED_QUESTION This action cannot be performed on a prompt object or prompt instance. Returned if an attempt is made to write to the property on a prompt object or instance.
  • OBJSVR_E_BAD_PROMPT_CANCEL The question cannot be closed because its Reuse property tells it to break rather than permit itself to be canceled.

HRESULT IDSSPrompt::Default [in] VARIANT *  pDefault  ) 
 

The value to which the prompt defaults.

Default is a read/write variant property. It represents the default answer of a prompt object. The type (or set of types) accepted by this depends on PromptType. In fact, we do not permit this property to be set at all until after PromptType has been set. Any value that would be valid as an answer to a prompt can also be accepted as a value of Default.

The property is Empty on a newly created prompt object. This property can always be set to Empty regardless of the setting of PromptType. This property is always Empty for draft prompts.
This property can only be altered on a prompt object or instance. For a non-draft prompt question this property always returns the same value as on the underlying prompt object/instance. For draft prompts it returns a structure showing what would happen if the user selected the default answer.
On a prompt instance this property contains a local default answer to the instance. This allows a user to override the default answer for a prompt when it is used in a prompt instance.
Parameters:
pDefault New value for this property. Empty is always acceptable, other values depend on PromptType.
pDefault The Default value for this prompt object or for the underlying prompt object of a prompt instance/question
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType is set.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType. Note that setting the default property for a draft prompt always returns this error.
  • OBJSVR_E_FIXED_IN_RESOLUTION This property cannot be altered from the resolution object; it is a property of the prompt object or prompt instance only.
  • OBJSVR_E_GLOBAL_PROMPT Returned if the user attempts to override the property of a prompt instance with Merge set to True.

HRESULT IDSSPrompt::Default [out, retval] VARIANT *  pDefault  ) 
 

The value to which the prompt defaults.

Default is a read/write variant property. It represents the default answer of a prompt object. The type (or set of types) accepted by this depends on PromptType. In fact, we do not permit this property to be set at all until after PromptType has been set. Any value that would be valid as an answer to a prompt can also be accepted as a value of Default.

The property is Empty on a newly created prompt object. This property can always be set to Empty regardless of the setting of PromptType. This property is always Empty for draft prompts.
This property can only be altered on a prompt object or instance. For a non-draft prompt question this property always returns the same value as on the underlying prompt object/instance. For draft prompts it returns a structure showing what would happen if the user selected the default answer.
On a prompt instance this property contains a local default answer to the instance. This allows a user to override the default answer for a prompt when it is used in a prompt instance.
Parameters:
pDefault New value for this property. Empty is always acceptable, other values depend on PromptType.
pDefault The Default value for this prompt object or for the underlying prompt object of a prompt instance/question
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType is set.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType. Note that setting the default property for a draft prompt always returns this error.
  • OBJSVR_E_FIXED_IN_RESOLUTION This property cannot be altered from the resolution object; it is a property of the prompt object or prompt instance only.
  • OBJSVR_E_GLOBAL_PROMPT Returned if the user attempts to override the property of a prompt instance with Merge set to True.

HRESULT IDSSPrompt::ExportsToPrompt [out, retval] IDSSExports   ppExports  ) 
 

Collection of prompts exported into this prompt instance.

This is a read-only collection property of prompt instances. When an application object is included in the definition of another application object, we often provide an Exports property that records exports of prompt instances from the parent application object to the child application object.

Since a prompt object is itself an application object, when a prompt object is used in an application object (by definition this usage is a prompt instance) it is possible to export other prompt instances from the same application object into the prompt instance. The resolution server uses this collection to decide which prompt instances to merge.
The collection defaults to an empty collection. There is no collection on a prompt object, or on a prompt question.
It is easy to create an application object that cannot be resolved by exporting instance A into instance B, and also exporting instance B into instance A. We do not automatically reject this configuration, since it is possible to design reports in which these exports are both applied, and yet there is no contradiction in the definition.
Parameters:
ppExports The collection of exports into this prompt NULL on prompt objects and on prompt questions
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSPrompt::HasPrevious [out, retval] VARIANT_BOOL *  pHasPrevious  ) 
 

True for a question that records a Previous answer.

HasPrevious is a read-only Boolean property. It is only used for a prompt question. For a prompt question it indicates whether or not the Previous property of the question is meaningful.

The only reason we need this property is so that a user can distinguish between Previous set to Empty because there is no previous value, and Previous set to Empty to indicate that on the previous execution the user choose to ignore this prompt.
Parameters:
pHasPrevious True for a prompt question with a previous answer False for a prompt question that does not have a previous answer Always returns False for a prompt instance or object
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSPrompt::Importable [in] VARIANT_BOOL  Importable  ) 
 

True if this prompt may be replaced by one imported from outside.

Importable is a read/write Boolean property of prompt instances. This property is set to True for a prompt instance which can be replaced at resolution time by using instead the answer from some other prompt instance that is imported from a parent object of the application object that contains this prompt instance.

Marking a prompt instance as importable allows a designer to create reports in which the prompts instances are merged in complex ways. For example it is the only way to merge four instances of the same prompt in pairs. It is also the only way for a non-draft prompt to cause the same prompt instance to be converted to multiple questions for different instances of the application object that contains the prompt object. See the Usage document for details on options available with the import/export functionality.
This property is always set to False on a new prompt instance. There is no problem with a prompt instance with both Merge and Importable set to True. This means that either a prompt is imported to replace the prompt instance, or the prompt instance is merged with other instances of the same prompt object.
This property always returns False for a prompt object, or a prompt question.
Setting Importable to False causes any value set to the ImportAs property to be lost.
Parameters:
Importable The new value of the property
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NOT_ON_PROMPT_OBJECT This action cannot be performed on a prompt object. Either a prompt instance or a prompt question must be used instead.
  • OBJSVR_E_FIXED_IN_RESOLUTION This property cannot be altered from the resolution object; it is a property of the prompt object or prompt instance only.

HRESULT IDSSPrompt::Importable [out, retval] VARIANT_BOOL *  pImportable  ) 
 

True if this prompt may be replaced by one imported from outside.

Importable is a read/write Boolean property of prompt instances. This property is set to True for a prompt instance which can be replaced at resolution time by using instead the answer from some other prompt instance that is imported from a parent object of the application object that contains this prompt instance.

Marking a prompt instance as importable allows a designer to create reports in which the prompts instances are merged in complex ways. For example it is the only way to merge four instances of the same prompt in pairs. It is also the only way for a non-draft prompt to cause the same prompt instance to be converted to multiple questions for different instances of the application object that contains the prompt object. See the Usage document for details on options available with the import/export functionality.
This property is always set to False on a new prompt instance. There is no problem with a prompt instance with both Merge and Importable set to True. This means that either a prompt is imported to replace the prompt instance, or the prompt instance is merged with other instances of the same prompt object.
This property always returns False for a prompt object, or a prompt question.
Setting Importable to False causes any value set to the ImportAs property to be lost.
Parameters:
pImportable Existing value of the property
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NOT_ON_PROMPT_OBJECT This action cannot be performed on a prompt object. Either a prompt instance or a prompt question must be used instead.
  • OBJSVR_E_FIXED_IN_RESOLUTION This property cannot be altered from the resolution object; it is a property of the prompt object or prompt instance only.

HRESULT IDSSPrompt::ImportAs [in] IDSSPrompt pImportAs  ) 
 

Specifies the prompt object to be imported to replace this prompt.

ImportAs is a read/write prompt-valued property of a prompt instance. It is only used for prompt instances that are importable. It records which prompt object is used to identify this prompt instance when calculating imports to the application object that contains this prompt instance.

If a prompt instance is importable then we need to have some way to match up prompt instances in a parent object, with prompt instances in a child object so that exports from the parent to the child can take place. We key these matches of a prompt object (and an index for the situation in which the same prompt object appears multiple times). Usually a prompt instance is keyed off its own prompt object, but setting this property to some other prompt object overrides this behavior.
This property is always NULL on a prompt object or a prompt question. It is also NULL on a prompt instance whose Importable property is set to False. If Importable is True it is never NULL. We default to returning the prompt object that underlies this prompt instance.
A valid ImportAs prompt object must be the same type of prompt as this prompt.
Parameters:
pImportAs The prompt object imported to replace this prompt instance NULL if this prompt is not a prompt instance/is not importable
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.
  • OBJSVR_E_NOT_ON_PROMPT_OBJECT This action cannot be performed on a prompt object. Either a prompt instance or a prompt question must be used instead.
  • OBJSVR_E_FIXED_IN_RESOLUTION This property cannot be altered from the resolution object; it is a property of the prompt object or prompt instance only.

HRESULT IDSSPrompt::ImportAs [out, retval] IDSSPrompt   ppImportAs  ) 
 

Specifies the prompt object to be imported to replace this prompt.

ImportAs is a read/write prompt-valued property of a prompt instance. It is only used for prompt instances that are importable. It records which prompt object is used to identify this prompt instance when calculating imports to the application object that contains this prompt instance.

If a prompt instance is importable then we need to have some way to match up prompt instances in a parent object, with prompt instances in a child object so that exports from the parent to the child can take place. We key these matches of a prompt object (and an index for the situation in which the same prompt object appears multiple times). Usually a prompt instance is keyed off its own prompt object, but setting this property to some other prompt object overrides this behavior.
This property is always NULL on a prompt object or a prompt question. It is also NULL on a prompt instance whose Importable property is set to False. If Importable is True it is never NULL. We default to returning the prompt object that underlies this prompt instance.
A valid ImportAs prompt object must be the same type of prompt as this prompt.
Parameters:
ppImportAs The prompt object imported to replace this prompt instance NULL if this prompt is not a prompt instance/is not importable
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.
  • OBJSVR_E_NOT_ON_PROMPT_OBJECT This action cannot be performed on a prompt object. Either a prompt instance or a prompt question must be used instead.
  • OBJSVR_E_FIXED_IN_RESOLUTION This property cannot be altered from the resolution object; it is a property of the prompt object or prompt instance only.

HRESULT IDSSPrompt::Incomplete [out, retval] VARIANT_BOOL *  pIncomplete  ) 
 

True if there are unanswered prompts in the validation properties.

Incomplete is a read-only Boolean property of prompt questions. It is set to True for any prompt question that cannot be answered because another prompt question needs to be answered first.

It is possible to define a prompt object by using prompts either directly, or indirectly, in the validation properties (Maximum, Minimum, Origin and Restriction) of the prompt object. When a designer does this, we cannot close a prompt question based on this prompt object until after all of the validation prompts have been closed. We use the Incomplete property to signify this state to the user. The user can find out which prompts we are directly waiting for by examining the Prompts collection of the prompt question. (This collection does not include prompts that we depend on indirectly.)
Even after the user has closed all of the prompts, the resolution server must be invoked again to clear the Incomplete flag. This is an expensive operation because the values returned by the validation properties of the prompt question that is modified so that they include the answers to the relevant prompts. At the same time the resolution server sets the Locked flag for the prompts that have already been closed to ensure that the user does not modify their values any more.
Parameters:
pIncomplete True if the prompt question cannot be answered yet. Always False for prompt objects and instances
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSPrompt::Index [in] Int32  Index  ) 
 

The position of this prompt instance in its collection.

Index is a read/write integer property. Both prompt instances and prompt questions are always found inside collections. This property returns the position of the instance or question inside its collection:

  • For a prompt instance it gives the position of the instance in the Info.Prompts collection of the application object that contains the instance. Writing to this property on a prompt instance will move the instance within the collection.
  • For a normal (i.e. non-blank) question it gives the position of the question in the resolution object from which the question was obtained. The order of the questions in the resolution object is fixed. An error is returned if the user attempts to write to a question's Index property.
  • For a blank question (i.e. a question corresponding to a prompt instance in a draft prompt object) it gives the position of the question in the draft prompt. This is always the same number as the position of the corresponding prompt instance in the draft prompt. Again, an error is returned if the user attempts to write to a question's Index property.
    Prompt objects do not record an Index value. Reading this property on a prompt object always returns 0.
    Parameters:
    Index New value for the Index
    Returns:
    Usual COM result code:
  • S_OK
  • OBJSVR_E_NOT_ON_PROMPT_OBJECT This action cannot be performed on a prompt object. Returned if an attempt is made to write to the property.
  • DSSCOM_E_INDEX_OUT_OF_RANGE New value was 0, negative, or larger than the current size of the collection
  • OBJSVR_E_FIXED_IN_RESOLUTION This property cannot be altered from the resolution object; it is a property of the prompt object or prompt instance only.

HRESULT IDSSPrompt::Index [out, retval] Int32 *  pIndex  ) 
 

The position of this prompt instance in its collection.

Index is a read/write integer property. Both prompt instances and prompt questions are always found inside collections. This property returns the position of the instance or question inside its collection:

  • For a prompt instance it gives the position of the instance in the Info.Prompts collection of the application object that contains the instance. Writing to this property on a prompt instance will move the instance within the collection.
  • For a normal (i.e. non-blank) question it gives the position of the question in the resolution object from which the question was obtained. The order of the questions in the resolution object is fixed. An error is returned if the user attempts to write to a question's Index property.
  • For a blank question (i.e. a question corresponding to a prompt instance in a draft prompt object) it gives the position of the question in the draft prompt. This is always the same number as the position of the corresponding prompt instance in the draft prompt. Again, an error is returned if the user attempts to write to a question's Index property.
    Prompt objects do not record an Index value. Reading this property on a prompt object always returns 0.
    Parameters:
    pIndex Value of the Index 0 for all prompt objects
    Returns:
    Usual COM result code:
  • S_OK
  • OBJSVR_E_NOT_ON_PROMPT_OBJECT This action cannot be performed on a prompt object. Returned if an attempt is made to write to the property.
  • DSSCOM_E_INDEX_OUT_OF_RANGE New value was 0, negative, or larger than the current size of the collection
  • OBJSVR_E_FIXED_IN_RESOLUTION This property cannot be altered from the resolution object; it is a property of the prompt object or prompt instance only.

HRESULT IDSSPrompt::Info [out, retval] IDSSObjectInfo   ppInfo  ) 
 

The usual IDSSObjectInfo interface on a prompt object.

This is a read-only property of a prompt object. Like all DSS Objects, prompt objects have an Info property that returns an interface that gives general information about the prompt object. This object can be used to assign a file name, or file description to the prompt object, or to perform any other task that is common to all DSS Objects.

Only prompt objects contain Info objects. Calling this method on a prompt instance, or a prompt question will return the Info object of the underlying prompt object. This is how to determine which prompt object was used to define a prompt instance, or a prompt question.
Parameters:
ppInfo Reference to the IDSSObjectInfo interface
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSPrompt::IsEquivalentAnswer [in] IDSSPrompt pPrompt,
[in, defaultvalue(0)] VARIANT_BOOL  DeepCompare,
[out, retval] VARIANT_BOOL *  pEquilalent
 

Test if the answer to this prompt is same as answer to other prompt.

IsEquivalentAnswer is a method. It is used to compare the answers help in two question prompts. It returns True if the both prompts have the equivalent answer. Two answers are considered to be equivalent if substituting one for the other does not effect (in any way) the results returned when a report is run using the answer.

This method can only be called on a question prompt that is on a prompt obtained from a resolution object. It does not matter whether or not the prompts are marked as Used; nor does it matter if the prompts are marked as Closed. If the prompt is not closed then we use whatever answer the prompt would have if the user were to set the Closed property to True. In other words we need to consider the Reuse properties of both prompts.
We are comparing the answers, not the prompts. It is perfectly possible for two different prompts to have the same answer. In particular if both prompts have been canceled then their answers are always equivalent.
This method never reports True if the answers are not equivalent. It may report False when the answers were in fact equivalent. For example it considers a+b to be different from b+a because it does not aware of commutative operators.
A deep compare means that the routine attempts to determine if different objects mentioned in the answers have equivalent definitions. Selecting a deep compare will take longer, but increases the chance that True is returned. We are not able to compare the definitions of some types of objects.
Parameters:
pPrompt The prompt whose answer we wish to compare with this prompt. This prompt must be a question prompt.
DeepCompare True = attempt to do a deep compare.
pEquilalent True = the two answers are functionally equivalent. False = we cannot determine if the functions are equivalent.
Returns:
Usual COM result code:
  • S_OK
  • E_INVALIDARG pPrompt was NULL.
  • OBJSVR_E_NEED_QUESTION Both prompts must be question prompts to use this method.

HRESULT IDSSPrompt::Locations [out, retval] IDSSPromptLocations   ppLocations  ) 
 

Collection of all the objects (in the report) that contain this prompt.

This is a read-only collection property of a prompt question. It returns a collection of prompt location objects. Each prompt location object represents a particular instance of a prompt. It can be used to find the application object that contains the prompt and the instance in the application object. It represents a place from which this prompt question was drawn.

This collection is used so that a user can determine which object, or objects the question that they are answering was found in. It provides context to answer the question. Because we typically merge instances to make questions we need to return a collection of locations.
Even if Merge is False a question may come from several locations because of the use of import/export. Since a designer can specify that the prompt imported to replace a prompt instance is based on a different prompt object, it is possible that some of the Locations may refer to prompts that are not based on the same prompt as this prompt.
The first location in the collection is significant. If it has Merge set to True this question is a global prompt based on the given prompt object. Otherwise this question is a local prompt and the first location is the prompt instance that specifies the question; the other locations are prompt instances that will be replaced when the answer to this question is imported on top of them.
Parameters:
ppLocations For a prompt question: the collection of locations of prompt instances NULL for a prompt object or prompt instance (no error)
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSPrompt::Locked [out, retval] VARIANT_BOOL *  pLocked  ) 
 

True if the prompt's answer cannot be modified any more.

Locked is a read-only Boolean property of a prompt question. Usually we permit a user to modify the answer to a question in a resolution object as often as a user desires. However sometimes when the resolution server is executed on a prompt it modifies the validation properties of some prompts depending on the answers of other prompts. The user is then re-prompted to answer the prompts whose validation properties were modified.

If at this point the user went back to the earlier prompts and altered their answers the validation properties would be wrong. Because the resolution server requires the definitions of all of the objects in a report (and so usually runs on the DSS Server) we do not want to re-resolve a report whenever a user modifies an answer. So we avoid the problem by not letting a user modify an earlier answer in this situation. When we do this, we set the Locked property to True so that a client program knows the reason for a prompt to be locked.
The resolution server has to be invoked if a user wants to alter the answer of a Locked prompt. If a user does this, he loses all of his answers to prompts that were dependent on the Locked prompt.
Parameters:
pLocked True if the prompt question is locked Always 'False' for prompt objects or instances (no error)
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSPrompt::Maximum [in] VARIANT *  pMaximum  ) 
 

A value used as an upper bound to validate an answer to the prompt.

Maximum is a read/write variant property. It is a validation property of a prompt; that is its value is used to validate an answer to the prompt. The meaning of this property depends on PromptType. In fact we do not permit this property to be set at all until after PromptType is set. Typically it is used to indicate an upper bound on the range of valid answers. For a prompt, which lets the user select several items, it is an upper bound on the number of items that can be selected. For example it is a Double for a double prompt, a Long for an object prompt and for an expression prompt. This property is part of a prompt object; a designer cannot amend it on either a prompt instance or prompt question.

For a prompt instance this property always returns the same value as on the underlying prompt object. For a prompt question it returns the resolved value of this property.
The resolved value of the property is usually the same as the value of the property on the underlying prompt object. However if the Maximum property is either supplied as a prompt (i.e. MaximumPrompt is set), or contains a prompt then the resolution server will attempt to resolve the Maximum property by substituting answers to the embedded prompts. If it succeeds then the Maximum property on the prompt question returns the resolved value. It cannot do this if one or more of the embedded prompts were not closed, in which case the prompt question is marked as Incomplete instead and Maximum returns the value from the prompt object.
Parameters:
pMaximum New value for this property. Empty is always acceptable, other values depend on PromptType.
pMaximum The Maximum value for this prompt object/instance. The resolved maximum value for a prompt question.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.

HRESULT IDSSPrompt::Maximum [out, retval] VARIANT *  pMaximum  ) 
 

A value used as an upper bound to validate an answer to the prompt.

Maximum is a read/write variant property. It is a validation property of a prompt; that is its value is used to validate an answer to the prompt. The meaning of this property depends on PromptType. In fact we do not permit this property to be set at all until after PromptType is set. Typically it is used to indicate an upper bound on the range of valid answers. For a prompt, which lets the user select several items, it is an upper bound on the number of items that can be selected. For example it is a Double for a double prompt, a Long for an object prompt and for an expression prompt. This property is part of a prompt object; a designer cannot amend it on either a prompt instance or prompt question.

For a prompt instance this property always returns the same value as on the underlying prompt object. For a prompt question it returns the resolved value of this property.
The resolved value of the property is usually the same as the value of the property on the underlying prompt object. However if the Maximum property is either supplied as a prompt (i.e. MaximumPrompt is set), or contains a prompt then the resolution server will attempt to resolve the Maximum property by substituting answers to the embedded prompts. If it succeeds then the Maximum property on the prompt question returns the resolved value. It cannot do this if one or more of the embedded prompts were not closed, in which case the prompt question is marked as Incomplete instead and Maximum returns the value from the prompt object.
Parameters:
pMaximum New value for this property. Empty is always acceptable, other values depend on PromptType.
pMaximum The Maximum value for this prompt object/instance. The resolved maximum value for a prompt question.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.

HRESULT IDSSPrompt::MaximumExports [out, retval] IDSSExports   ppExports  ) 
 

Exports from this prompt into its Maximum value.

MaximumExports is a read-only collection property. It returns the collection of exports from this prompt object into the value held in the Maximum property. This collection can only be edited at the prompt object level, although it can be accessed from a prompt instance, or a prompt question. If the designer chooses to define the Maximum property as an object that contains prompts then the designer can use this collection to export prompts into the object.

Some types of prompts don't have a Maximum value at all. For these types of prompts there is no MaximumExports collection.
Reading this property on a prompt instance or a prompt question always returns the same collection as on the underlying prompt object. This is true even if the prompt concerned has been closed, and so we now know the value of the prompt.
Parameters:
ppExports The collection of Export objects. NULL if PromptType indicates that there is no Maximum property at all, or if PromptType has not yet been set
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSPrompt::MaximumPrompt [in] IDSSPrompt pPrompt  ) 
 

Used if the Maximum value is itself a prompt.

MaximumPrompt is a read/write prompt property. Maximum is one of the validation properties of a prompt - it contains a value that is used to restrict the set of acceptable answers to a prompt. The acceptable type of this property depends on the type of the prompt. If a designer wishes to specify that the Maximum value is supplied as the answer of another prompt, then the designer uses this property to specify which prompt should be used.

This property can only be modified at the prompt object level, although the value it contains can be read at any level. The value returned by this prompt is a prompt instance in the prompt's prompt instance collection. However the property can be set to a prompt object, which adds a new instance to the collection, if the chosen prompt was not already in it.
Setting this property causes Maximum to be set to Empty and the MaximumExports collection to be cleared since the maximum value must either be supplied as a prompt, or as an explicit value with possible exports. If the PromptType indicates that there is no Maximum property at all then setting MaximumPrompt to anything other than NULL will return an error.
Setting this property on anything other than a prompt object will always return an error.
Reading this property on a prompt instance or a prompt question will always return the same value as on the underlying prompt object. This is true even if the prompt concerned has been closed, and so we now know the value of the prompt.
Parameters:
pPrompt A reference to the prompt that should be used to obtain the Maximum value. Must be either the prompt object, or a prompt instance in the collection of prompts used by this object. NULL = the Maximum value is not obtained from a prompt.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.

HRESULT IDSSPrompt::MaximumPrompt [out, retval] IDSSPrompt   ppPrompt  ) 
 

Used if the Maximum value is itself a prompt.

MaximumPrompt is a read/write prompt property. Maximum is one of the validation properties of a prompt - it contains a value that is used to restrict the set of acceptable answers to a prompt. The acceptable type of this property depends on the type of the prompt. If a designer wishes to specify that the Maximum value is supplied as the answer of another prompt, then the designer uses this property to specify which prompt should be used.

This property can only be modified at the prompt object level, although the value it contains can be read at any level. The value returned by this prompt is a prompt instance in the prompt's prompt instance collection. However the property can be set to a prompt object, which adds a new instance to the collection, if the chosen prompt was not already in it.
Setting this property causes Maximum to be set to Empty and the MaximumExports collection to be cleared since the maximum value must either be supplied as a prompt, or as an explicit value with possible exports. If the PromptType indicates that there is no Maximum property at all then setting MaximumPrompt to anything other than NULL will return an error.
Setting this property on anything other than a prompt object will always return an error.
Reading this property on a prompt instance or a prompt question will always return the same value as on the underlying prompt object. This is true even if the prompt concerned has been closed, and so we now know the value of the prompt.
Parameters:
ppPrompt A prompt instance from the collection of prompts in this object. NULL if this property is not set to a prompt
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.

HRESULT IDSSPrompt::Meaning [in] BSTR  Meaning  ) 
 

A long string used to define the meaning of a prompt in a context.

Meaning is a read/write string property. This string should contain an explanation of the meaning of the prompt instance to a user. It is intended that this is a full explanation; one that should enable a user with no previous knowledge of the prompt instance to understand what answering the prompt entails. The short explanation is stored in the Title property.

This property is stored at both the prompt object and the prompt instance level. In the former case it should give a general meaning for the prompt. The latter case should be used only if Merge is set to False. When a designer has asked that an instance of a prompt should not be merged with the other instances of the same prompt then it behooves the designer to override the Meaning property so that a user can identify which instance of the prompt she is answering.
On a prompt object this property acts like a normal string property. It can be set to any value (including the empty string).
On a prompt instance, reading this property defaults to the same value as the underlying prompt object. Setting this property to another value overrides the value of the prompt object for this prompt instance. Setting this property to NULL or the empty string on a prompt instance makes the property revert to the value of the prompt object. Although a designer should always want to set this property if Merge is False and there is no point in setting it if Merge is True.
On a prompt question, reading this property returns the same value as on the prompt object, if the question is taken from prompt instances with Merge set to True. It returns the same value as the prompt instance if it was taken from a prompt instance with Merge set to False. It is an error to attempt to write to this property on a prompt question.
Parameters:
Meaning The new meaning for the prompt. May be NULL / empty string.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_FIXED_IN_RESOLUTION This property cannot be altered from the resolution object; it is a property of the prompt object or prompt instance only.
  • OBJSVR_E_GLOBAL_PROMPT Returned if the user attempts to override the property of a prompt instance with Merge set to True.

HRESULT IDSSPrompt::Meaning [out, retval] BSTR *  pMeaning  ) 
 

A long string used to define the meaning of a prompt in a context.

Meaning is a read/write string property. This string should contain an explanation of the meaning of the prompt instance to a user. It is intended that this is a full explanation; one that should enable a user with no previous knowledge of the prompt instance to understand what answering the prompt entails. The short explanation is stored in the Title property.

This property is stored at both the prompt object and the prompt instance level. In the former case it should give a general meaning for the prompt. The latter case should be used only if Merge is set to False. When a designer has asked that an instance of a prompt should not be merged with the other instances of the same prompt then it behooves the designer to override the Meaning property so that a user can identify which instance of the prompt she is answering.
On a prompt object this property acts like a normal string property. It can be set to any value (including the empty string).
On a prompt instance, reading this property defaults to the same value as the underlying prompt object. Setting this property to another value overrides the value of the prompt object for this prompt instance. Setting this property to NULL or the empty string on a prompt instance makes the property revert to the value of the prompt object. Although a designer should always want to set this property if Merge is False and there is no point in setting it if Merge is True.
On a prompt question, reading this property returns the same value as on the prompt object, if the question is taken from prompt instances with Merge set to True. It returns the same value as the prompt instance if it was taken from a prompt instance with Merge set to False. It is an error to attempt to write to this property on a prompt question.
Parameters:
pMeaning The existing meaning for this prompt.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_FIXED_IN_RESOLUTION This property cannot be altered from the resolution object; it is a property of the prompt object or prompt instance only.
  • OBJSVR_E_GLOBAL_PROMPT Returned if the user attempts to override the property of a prompt instance with Merge set to True.

HRESULT IDSSPrompt::Merge [in] VARIANT_BOOL  Merge  ) 
 

True means merge this instance with other instances of this prompt.

Merge is a read/write Boolean property. This property is a property of a prompt instance. At resolution time all prompt instances with Merge set to True (its default value) are merged into a single question prompt. This behavior provides a simple way for a user to share prompts across multiple objects without having to use import/export.

This property is not stored on a prompt object. Reading it on a prompt object always returns True. Because of the resolution algorithm it does make sense to read this property for prompt questions. However it cannot be written for prompt questions.
We sometimes refer to a prompt with Merge set to True as a global prompt.
Note that there appears to be a contradiction between our assertion that we merge all instances of a prompt object with Merge equal to True, and that if a prompt object appears twice in a prompt-instance collection then we prompt the user twice for these prompts. The contradiction is resolved because we do not permit two distinct instances of the same prompt object in the same application object to both have Merge equal to True. We maintain this restriction by using the following rules: -
  • The first instance of a prompt object defaults to Merge = True.
  • Subsequent instances (of the same prompt object) default to Merge = True if all of the existing instances have Merge = False. But if an existing Instance has Merge = True, then the instance has to set Merge = False.
  • If a client sets Merge to True, and we find an existing prompt instance of the same prompt object, in the same collection with Merge set to True, then we set the other instance's Merge to False. (Like in a radio buttons control.)
  • If a client sets Merge to False we take no additional action. There is no contradiction in not having any instance with Merge set to 'True'.
Setting the Merge property to True turns a local prompt instance into a global prompt instance. All of the properties that can be overridden for a local prompt, but not for a global prompt instance is lost. In particular this action clears the ExportsToPrompt collection.
Parameters:
Merge New value for the Merge property
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NOT_ON_PROMPT_OBJECT This action cannot be performed on a prompt object. Returned if an attempt is made to write to the property on a prompt object.
  • OBJSVR_E_FIXED_IN_RESOLUTION This property cannot be altered from the resolution object; it is a property of the prompt object or prompt instance only.

HRESULT IDSSPrompt::Merge [out, retval] VARIANT_BOOL *  pMerge  ) 
 

True means merge this instance with other instances of this prompt.

Merge is a read/write Boolean property. This property is a property of a prompt instance. At resolution time all prompt instances with Merge set to True (its default value) are merged into a single question prompt. This behavior provides a simple way for a user to share prompts across multiple objects without having to use import/export.

This property is not stored on a prompt object. Reading it on a prompt object always returns True. Because of the resolution algorithm it does make sense to read this property for prompt questions. However it cannot be written for prompt questions.
We sometimes refer to a prompt with Merge set to True as a global prompt.
Note that there appears to be a contradiction between our assertion that we merge all instances of a prompt object with Merge equal to True, and that if a prompt object appears twice in a prompt-instance collection then we prompt the user twice for these prompts. The contradiction is resolved because we do not permit two distinct instances of the same prompt object in the same application object to both have Merge equal to True. We maintain this restriction by using the following rules: -
  • The first instance of a prompt object defaults to Merge = True.
  • Subsequent instances (of the same prompt object) default to Merge = True if all of the existing instances have Merge = False. But if an existing Instance has Merge = True, then the instance has to set Merge = False.
  • If a client sets Merge to True, and we find an existing prompt instance of the same prompt object, in the same collection with Merge set to True, then we set the other instance's Merge to False. (Like in a radio buttons control.)
  • If a client sets Merge to False we take no additional action. There is no contradiction in not having any instance with Merge set to 'True'.
Setting the Merge property to True turns a local prompt instance into a global prompt instance. All of the properties that can be overridden for a local prompt, but not for a global prompt instance is lost. In particular this action clears the ExportsToPrompt collection.
Parameters:
pMerge The existing value of the Merge property Always True on a object prompt
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NOT_ON_PROMPT_OBJECT This action cannot be performed on a prompt object. Returned if an attempt is made to write to the property on a prompt object.
  • OBJSVR_E_FIXED_IN_RESOLUTION This property cannot be altered from the resolution object; it is a property of the prompt object or prompt instance only.

HRESULT IDSSPrompt::Minimum [in] VARIANT *  pMinimum  ) 
 

A value used as a lower bound to validate an answer to the prompt.

Minimum is a read/write variant property. It is a validation property of a prompt; that is its value is used to validate an answer to the prompt. The meaning of this property depends on PromptType. In fact we do not permit this property to be set at all until after PromptType is set. Typically it is used to indicate a lower bound on the range of valid answers. For a prompt, which lets the user select several items, it is a lower bound on the number of items that can be selected. For example it is a Double for a double prompt, a Long for an object prompt and for an expression prompt. This property is part of a prompt object; a designer cannot amend it on either a prompt instance or prompt question.

For a prompt instance this property always returns the same value as on the underlying prompt object. For a prompt question it returns the resolved value of this property.
The resolved value of the property is usually the same as the value of the property on the underlying prompt object. However, if the Minimum property is either supplied as a prompt (i.e. MinimumPrompt is set), or contains a prompt then the resolution server attempts to resolve the Minimum property by substituting answers to the embedded prompts. If it succeeds then the Minimum property on the prompt question will return the resolved value. It cannot do this if one or more of the embedded prompts are not closed, in which case the prompt question is marked as Incomplete instead and Minimum returns the value from the prompt object.
Parameters:
pMinimum New value for this property. Empty is always acceptable, other values depend on PromptType.
pMinimum The Minimum value for this prompt object/instance. The resolved minimum value for a prompt question.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.

HRESULT IDSSPrompt::Minimum [out, retval] VARIANT *  pMinimum  ) 
 

A value used as a lower bound to validate an answer to the prompt.

Minimum is a read/write variant property. It is a validation property of a prompt; that is its value is used to validate an answer to the prompt. The meaning of this property depends on PromptType. In fact we do not permit this property to be set at all until after PromptType is set. Typically it is used to indicate a lower bound on the range of valid answers. For a prompt, which lets the user select several items, it is a lower bound on the number of items that can be selected. For example it is a Double for a double prompt, a Long for an object prompt and for an expression prompt. This property is part of a prompt object; a designer cannot amend it on either a prompt instance or prompt question.

For a prompt instance this property always returns the same value as on the underlying prompt object. For a prompt question it returns the resolved value of this property.
The resolved value of the property is usually the same as the value of the property on the underlying prompt object. However, if the Minimum property is either supplied as a prompt (i.e. MinimumPrompt is set), or contains a prompt then the resolution server attempts to resolve the Minimum property by substituting answers to the embedded prompts. If it succeeds then the Minimum property on the prompt question will return the resolved value. It cannot do this if one or more of the embedded prompts are not closed, in which case the prompt question is marked as Incomplete instead and Minimum returns the value from the prompt object.
Parameters:
pMinimum New value for this property. Empty is always acceptable, other values depend on PromptType.
pMinimum The Minimum value for this prompt object/instance. The resolved minimum value for a prompt question.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.

HRESULT IDSSPrompt::MinimumExports [out, retval] IDSSExports   ppExports  ) 
 

Exports from this prompt into its Minimum value.

MinimumExports is a read-only collection property. It returns the collection of exports from this prompt object into the value held in the Minimum property. This collection can only be edited at the prompt object level, although it can be accessed from a prompt instance, or a prompt question. If the designer chooses to define the Minimum property as an object that contains prompts then the designer can use this collection to export prompts into the object.

Some types of prompts don't have a Minimum value at all. For these types of prompts there is no MinimumExports collection.
Reading this property on a prompt instance or a prompt question always returns the same value as on the underlying prompt object. This is true even if the prompt concerned has been closed, and so we now know the value of the prompt.
Parameters:
ppExports The collection of Export objects. NULL if PromptType indicates that there is no Minimum property at all, or if it has yet to be set.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSPrompt::MinimumPrompt [in] IDSSPrompt pPrompt  ) 
 

Used if the Minimum value is itself a prompt.

MinimumPrompt is a read/write prompt property. Minimum is one of the validation properties of a prompt - it contains a value that is used to restrict the set of acceptable answers to a prompt. The acceptable type of this property depends on the type of the prompt. If a designer wishes to specify that the Minimum value is supplied as the answer of another prompt, then the designer uses this property to specify which prompt should be used.

This property can only be modified at the prompt object level, although the value it contains can be read at any level. The value returned by this prompt is a prompt instance in the prompt's prompt instance collection. However the property can be set to a prompt object, which adds a new instance to the collection, if the chosen prompt was not already in it.
Setting this property causes Minimum to be set to Empty and the MinimumExports collection to be cleared since the minimum value must either be supplied as a prompt, or as an explicit value with possible exports. If the PromptType indicates that there is no Minimum property at all then setting MinimumPrompt to anything other than NULL returns an error.
Setting this property on anything other than a prompt object always returns an error.
Reading this property on a prompt instance or a prompt question always returns the same value as on the underlying prompt object. This is true even if the prompt concerned is closed, and so we now know the value of the prompt.
Parameters:
pPrompt A reference to the prompt that should be used to obtain the Minimum value. Must be either the prompt object, or a prompt instance in the collection of prompts used by this object. NULL = the Minimum value is not obtained from a prompt.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance / question.

HRESULT IDSSPrompt::MinimumPrompt [out, retval] IDSSPrompt   ppPrompt  ) 
 

Used if the Minimum value is itself a prompt.

MinimumPrompt is a read/write prompt property. Minimum is one of the validation properties of a prompt - it contains a value that is used to restrict the set of acceptable answers to a prompt. The acceptable type of this property depends on the type of the prompt. If a designer wishes to specify that the Minimum value is supplied as the answer of another prompt, then the designer uses this property to specify which prompt should be used.

This property can only be modified at the prompt object level, although the value it contains can be read at any level. The value returned by this prompt is a prompt instance in the prompt's prompt instance collection. However the property can be set to a prompt object, which adds a new instance to the collection, if the chosen prompt was not already in it.
Setting this property causes Minimum to be set to Empty and the MinimumExports collection to be cleared since the minimum value must either be supplied as a prompt, or as an explicit value with possible exports. If the PromptType indicates that there is no Minimum property at all then setting MinimumPrompt to anything other than NULL returns an error.
Setting this property on anything other than a prompt object always returns an error.
Reading this property on a prompt instance or a prompt question always returns the same value as on the underlying prompt object. This is true even if the prompt concerned is closed, and so we now know the value of the prompt.
Parameters:
ppPrompt A prompt instance from the collection of prompts in this object. NULL if this property is not set to a prompt.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance / question.

HRESULT IDSSPrompt::Origin [in] VARIANT *  pOrigin  ) 
 

A value used as a basis for an answer to the prompt.

Origin is a read/write variant property. It is a validation property of a prompt; that is its value is used to validate an answer to the prompt. The meaning of this property depends on PromptType. In fact we do not permit this property to be set at all until after PromptType is set. Typically it is used to indicate an object that is the source for valid answers. For example it is a dimension for an elements prompt and the draft object for any type of draft prompt. This property is part of a prompt object; a designer cannot amend it on either a prompt instance or prompt question.

For a prompt instance this property always returns the same value as on the underlying prompt object. For a prompt question it returns the resolved value of this property.
The resolved value of the property is usually the same as the value of the property on the underlying prompt object. However if the Origin property is either supplied as a prompt (i.e. OriginPrompt is set), or contains a prompt then the resolution server attempts to resolve the Origin property by substituting answers to the embedded prompts. If it succeeds then the Origin property on the prompt question returns the resolved value. It cannot do this if one or more of the embedded prompts are not closed, in which case the prompt question is marked as Incomplete instead and Origin returns the value from the prompt object.
For a draft prompt the Origin property has a slightly different meaning - it contains the draft object that the user enters to answer the prompt. In this case the resolved value is obtained by substituting in some prompts (those with Merge set to True or which are exported into the Origin collection via the OriginExports collection) but leaving the remaining blank prompts alone.
Parameters:
pOrigin New value for this property. Empty is always acceptable, other values depend on PromptType.
pOrigin The Origin value for this prompt object/instance. The resolved origin value for a prompt question.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.

HRESULT IDSSPrompt::Origin [out, retval] VARIANT *  pOrigin  ) 
 

A value used as a basis for an answer to the prompt.

Origin is a read/write variant property. It is a validation property of a prompt; that is its value is used to validate an answer to the prompt. The meaning of this property depends on PromptType. In fact we do not permit this property to be set at all until after PromptType is set. Typically it is used to indicate an object that is the source for valid answers. For example it is a dimension for an elements prompt and the draft object for any type of draft prompt. This property is part of a prompt object; a designer cannot amend it on either a prompt instance or prompt question.

For a prompt instance this property always returns the same value as on the underlying prompt object. For a prompt question it returns the resolved value of this property.
The resolved value of the property is usually the same as the value of the property on the underlying prompt object. However if the Origin property is either supplied as a prompt (i.e. OriginPrompt is set), or contains a prompt then the resolution server attempts to resolve the Origin property by substituting answers to the embedded prompts. If it succeeds then the Origin property on the prompt question returns the resolved value. It cannot do this if one or more of the embedded prompts are not closed, in which case the prompt question is marked as Incomplete instead and Origin returns the value from the prompt object.
For a draft prompt the Origin property has a slightly different meaning - it contains the draft object that the user enters to answer the prompt. In this case the resolved value is obtained by substituting in some prompts (those with Merge set to True or which are exported into the Origin collection via the OriginExports collection) but leaving the remaining blank prompts alone.
Parameters:
pOrigin New value for this property. Empty is always acceptable, other values depend on PromptType.
pOrigin The Origin value for this prompt object/instance. The resolved origin value for a prompt question.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType has been set.
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.
  • OBJSVR_E_CONFLICTS_PROMPT_TYPE This value is incompatible with PromptType.

HRESULT IDSSPrompt::OriginExports [out, retval] IDSSExports   ppExports  ) 
 

Exports from this prompt into its Origin value.

OriginExports is a read-only collection property. It returns the collection of exports from this prompt object into the value held in the Origin property. This collection can only be edited at the prompt object level, although it can be accessed from a prompt instance, or a prompt question. If the designer chooses to define the Origin property as an object that contains prompts then the designer can use this collection to export prompts into the object.

Some types of prompts do not have an Origin value. These types of prompts do not have an OriginExports collection.
Reading this property on a prompt instance or a prompt question always returns the same value as on the underlying prompt object. This is true even if the prompt concerned is closed, so we now know the value of the prompt.
Parameters:
ppExports The collection of Export objects. NULL if PromptType indicates that there is no Origin property, or if it has yet to be set.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSPrompt::OriginPrompt [in] IDSSPrompt pPrompt  ) 
 

Used it the Origin value is itself a prompt.

OriginPrompt is a read/write prompt property. Origin is one of the validation properties of a prompt - it contains a value that is used to restrict the set of acceptable answers to a prompt. The acceptable type of this property depends on the type of the prompt. If a designer wishes to specify that the Origin value is supplied as the answer of another prompt, then the designer uses this property to specify which prompt should be used.

This property can only be modified at the prompt object level, although the value it contains can be read at any level. The value returned by this prompt is a prompt instance in the prompt's prompt instance collection. However the property can be set to a prompt object, which adds a new instance to the collection, if the chosen prompt is not already in it.
Setting this property causes Origin to be set to Empty and the OriginExports collection to be cleared since the origin value must either be supplied as a prompt, or as an explicit value with possible exports. If the PromptType indicates that there is no Origin property, then setting OriginPrompt to anything other than NULL returns an error. It is not possible to set an OriginPrompt for a draft prompt.
Setting this property on anything other than a prompt object always returns an error.
Reading this property on a prompt instance or a prompt question always returns the same value as on the underlying prompt object. This is true even if the prompt concerned has been closed, and so we now know the value of the prompt.
Parameters:
pPrompt A reference to the prompt that should be used to obtain the Origin value. Must be either the prompt object, or a prompt instance in the collection of prompts used by this object. NULL = the Origin value is not obtained from a prompt.
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType is set.
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.

HRESULT IDSSPrompt::OriginPrompt [out, retval] IDSSPrompt   ppPrompt  ) 
 

Used it the Origin value is itself a prompt.

OriginPrompt is a read/write prompt property. Origin is one of the validation properties of a prompt - it contains a value that is used to restrict the set of acceptable answers to a prompt. The acceptable type of this property depends on the type of the prompt. If a designer wishes to specify that the Origin value is supplied as the answer of another prompt, then the designer uses this property to specify which prompt should be used.

This property can only be modified at the prompt object level, although the value it contains can be read at any level. The value returned by this prompt is a prompt instance in the prompt's prompt instance collection. However the property can be set to a prompt object, which adds a new instance to the collection, if the chosen prompt is not already in it.
Setting this property causes Origin to be set to Empty and the OriginExports collection to be cleared since the origin value must either be supplied as a prompt, or as an explicit value with possible exports. If the PromptType indicates that there is no Origin property, then setting OriginPrompt to anything other than NULL returns an error. It is not possible to set an OriginPrompt for a draft prompt.
Setting this property on anything other than a prompt object always returns an error.
Reading this property on a prompt instance or a prompt question always returns the same value as on the underlying prompt object. This is true even if the prompt concerned has been closed, and so we now know the value of the prompt.
Parameters:
ppPrompt A prompt instance from the collection of prompts in this object. NULL if this property is not set to a prompt
Returns:
Usual COM result code:
  • S_OK
  • OBJSVR_E_NO_PROMPT_TYPE This property cannot be set until after PromptType is set.
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.

HRESULT IDSSPrompt::Populate [in] IDSSPrompt pOriginal  ) 
 

This method acts like an assignment operator in C++.

It replaces the definition of this object with the definition of the argument. It implements cloning of the argument object. It only applies to prompt objects.

Parameters:
pOriginal The original object. May not be NULL.
Returns:
Usual COM result code:
  • OBJSVR_E_PROMPT_OBJECT_ONLY This method is part of the prompt object. It cannot be called on a prompt instance/question.
  • S_OK
  • E_INVALIDARG POriginal was NULL

HRESULT IDSSPrompt::Previous [out, retval] VARIANT *  pPrevious  ) 
 

The answer, if known, given last time the prompt was resolved.

Previous is a read-only variant property. On a question prompt it returns the answer given to the prompt on the last occasion in which this particular question was answered. It returns Empty if this question was not asked previously. For draft prompts it returns a structure showing what would happen if the user asked to select the previous value.

Examine the HasPrevious property to determine if the Previous value was Empty or if there was no previous value. In both cases this property returns Empty.
Reading this property on a prompt object or instance will always return the value Empty. We do not return an error in this situation.
Parameters:
pPrevious A Variant object containing the Previous value The type of VARIANT to expect depends on PromptType For any type of prompt Empty is a valid result
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSPrompt::Prompts [out, retval] IDSSPrompts   ppPrompts  ) 
 

The collection of prompt instances used in this prompt.

This is a read-only collection property. This property returns the collection of prompts that are used internally to define this prompt.

  • For a prompt object or a prompt instance, the collection is the normal prompt instances collection of all the prompts used somewhere in the definition of the prompt object. It is in fact a shortcut to the Info.Prompts collection.
  • For a prompt question the collection contains the prompt questions that correspond to the prompt instances in the Info.Prompts collection. This is a convenient way to discover which questions need to be answered to answer all the prompt instances that appear in this prompt.
    Parameters:
    ppPrompts The collection of prompt instances used in the prompt object/instance The collection of prompt questions used in this prompt question
    Returns:
    Usual COM result code:
  • S_OK

HRESULT IDSSPrompt::PromptType [in] EnumDSSPromptType  PromptType  ) 
 

The type of data that is used to answer this prompt.

This property is a read/write enumeration. The value of the property is the type of the prompt object. The type of the prompt indicates the type of data that the prompt returns. We consider it to be a fundamental property of a prompt. Since changing the type of a prompt would result in a new prompt, we do not permit a user to change the type of a prompt once it has been assigned.

When a prompt is initially created its type is DssPromptReserved. The designer of the prompt should immediately set PromptType to another value. Many properties of the prompt cannot be set until after the prompt's type is fixed.
This property can be read on prompt objects, instances and questions. This property can only be written on prompt objects. It is not possible to make an instance of a prompt until after its type has been fixed.
The following table (taken from the usage document) shows the available types of prompts, along with the types of data each prompt type requires other properties to contain. The prompt types with empty cells have not been designed at this time.
Name Answer Minimum
Parameters:
PromptType The new type of the prompt
Returns:
Usual COM result code:
  • S_OK
  • DSSCOM_E_RESERVED_VALUE Cannot assign an enumeration to its reserved value
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.
  • OBJSVR_E_UNSUPPORTED_PROMPT Attempt made to use an unsupported prompt type. This error also returned for out of range input
  • OBJSVR_E_PROMPT_TYPE_FIXED An attempt was made to alter the type of a prompt after the type was set

HRESULT IDSSPrompt::PromptType [out, retval] EnumDSSPromptType pPromptType  ) 
 

The type of data that is used to answer this prompt.

This property is a read/write enumeration. The value of the property is the type of the prompt object. The type of the prompt indicates the type of data that the prompt returns. We consider it to be a fundamental property of a prompt. Since changing the type of a prompt would result in a new prompt, we do not permit a user to change the type of a prompt once it has been assigned.

When a prompt is initially created its type is DssPromptReserved. The designer of the prompt should immediately set PromptType to another value. Many properties of the prompt cannot be set until after the prompt's type is fixed.
This property can be read on prompt objects, instances and questions. This property can only be written on prompt objects. It is not possible to make an instance of a prompt until after its type has been fixed.
The following table (taken from the usage document) shows the available types of prompts, along with the types of data each prompt type requires other properties to contain. The prompt types with empty cells have not been designed at this time.
Name Answer Minimum
Parameters:
pPromptType The existing type of the prompt
Returns:
Usual COM result code:
  • S_OK
  • DSSCOM_E_RESERVED_VALUE Cannot assign an enumeration to its reserved value
  • OBJSVR_E_PROMPT_OBJECT_ONLY This property is part of the prompt object. It cannot be amended from prompt instance/question.
  • OBJSVR_E_UNSUPPORTED_PROMPT Attempt made to use an unsupported prompt type. This error also returned for out of range input
  • OBJSVR_E_PROMPT_TYPE_FIXED An attempt was made to alter the type of a prompt after the type was set

HRESULT IDSSPrompt::Restriction [in] VARIANT *  pRestriction  ) 
 

A value used as a restriction to validate an answer to the prompt.

HRESULT IDSSPrompt::Restriction [out, retval] VARIANT *  pRestriction  ) 
 

A value used as a restriction to validate an answer to the prompt.

HRESULT IDSSPrompt::RestrictionExports [out, retval] IDSSExports   ppExports  ) 
 

Exports from this prompt into its Restriction value.

HRESULT IDSSPrompt::RestrictionPrompt [in] IDSSPrompt pPrompt  ) 
 

Used it the Restriction value is itself a prompt.

HRESULT IDSSPrompt::RestrictionPrompt [out, retval] IDSSPrompt   ppPrompt  ) 
 

Used it the Restriction value is itself a prompt.

HRESULT IDSSPrompt::Reuse [in] EnumDSSPromptReuse  Reuse  ) 
 

Defaulting strategy used if a previous value of the prompt is known.

HRESULT IDSSPrompt::Reuse [out, retval] EnumDSSPromptReuse pReuse  ) 
 

Defaulting strategy used if a previous value of the prompt is known.

HRESULT IDSSPrompt::Title [in] BSTR  Title  ) 
 

A short string used, in context, to title the prompt.

HRESULT IDSSPrompt::Title [out, retval] BSTR *  pTitle  ) 
 

A short string used, in context, to title the prompt.

HRESULT IDSSPrompt::Used [out, retval] VARIANT_BOOL *  pUsed  ) 
 

True if this prompt is known to be used somewhere in the resolution.


Copyright © 1996-2018 MicroStrategy Inc. All Rights Reserved.