Author: Fazle Hasan
March 8, 2023
If you need an user Input to your process, you can use the following Input page and use the
following function to call the page (used to be done before using DotNet Type object: Input box).
=================
Calling Function:
=================
PROCEDURE GetUserResponse@1000000000(ptxtLbl@1000000000 : Text[250]) : Text[250];
VAR
InputPage@1000000001 : Page 50000;
BEGIN
CLEAR(InputPage);
InputPage.setResponseLbl(ptxtLbl);
InputPage.LOOKUPMODE:=TRUE;
IF InputPage.RUNMODAL=ACTION::LookupOK THEN
EXIT(InputPage.GetResponse);
EXIT('');
END;
===========
Input Page:
===========
OBJECT Page 50000 InputPage
{
OBJECT-PROPERTIES
{
Date=01/01/20;
Time=[ 4:01:37 PM];
Modified=Yes;
Version List=1.0.0.1;
}
PROPERTIES
{
}
CONTROLS
{
{ 1000000000;;Container;
Name=ResponseInput;
ContainerType=ContentArea }
{ 1000000003;1;Group ;
CaptionML=[ENU=Input Box;
ENC=Input Box];
GroupType=GridLayout }
{ 1000000001;2;Field ;
CaptionML=[ENU=Please Input Response:;
ENC=Please Input Response:];
SourceExpr=txtLbl;
Editable=false;
Style=Strong;
StyleExpr=TRUE;
ShowCaption=No }
{ 1000000002;2;Field ;
SourceExpr=txtResponse;
Importance=Promoted;
ShowCaption=No }
}
CODE
{
VAR
txtResponse@1000000000 : Text[250];
txtLbl@1000000001 : Text[250];
PROCEDURE setResponseLbl@1000000002(ptxtLbl@1000000000 : Text[250]);
BEGIN
txtLbl:=ptxtLbl;
END;
PROCEDURE GetResponse@1000000000() : Text[250];
BEGIN
EXIT(txtResponse);
END;
BEGIN
END.
}
}
Comments
Post a Comment