PdcApplication.ActiveObjectResult: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
No edit summary
 
Line 1: Line 1:
== Declaration ==
== Declaration ==
 
ActiveObjectResult as Boolean


== Description ==
== Description ==
 
Returns the active object result


== Notes ==
== Notes ==
 
Especially useful when the checks or inputs done in the script may decide not to close the form in PdC.
E.g. for mandatory data entry.


== Code example ==
== Code example ==
 
In userexit SCR_BEFORECALCCLOSE check for a not null field. In case userfield3 is empty, the form may not be closed.
After closing the message box the user is returned to the calculation form.


<source lang="vb">
<source lang="vb">
dim objCalc


  if objCalc.UserString(2) = "" then
    pdc.ActiveObjectResult = false
    msgbox "Please enter value for UserField3"
  else
    pdc.ActiveObjectResult = true
  end if
</source>
</source>


== Availability ==
== Availability ==
Available since June 2006 (From version 3.7).

Latest revision as of 11:30, 21 May 2012

Declaration

ActiveObjectResult as Boolean

Description

Returns the active object result

Notes

Especially useful when the checks or inputs done in the script may decide not to close the form in PdC. E.g. for mandatory data entry.

Code example

In userexit SCR_BEFORECALCCLOSE check for a not null field. In case userfield3 is empty, the form may not be closed. After closing the message box the user is returned to the calculation form.

dim objCalc

  if objCalc.UserString(2) = "" then 
    pdc.ActiveObjectResult = false
    msgbox "Please enter value for UserField3"
  else
    pdc.ActiveObjectResult = true
  end if

Availability

Available since June 2006 (From version 3.7).