OBJECT Form 58887 TestForm { OBJECT-PROPERTIES { Date=04/08/16; Time=[ 3:43:08 PM]; Modified=Yes; Version List=; } PROPERTIES { Width=3740; Height=2860; } CONTROLS { { 6000000;CommandButton;660;1540;2200 ;550 ;CaptionML=ENU=Confirm; OnPush=VAR ConfirmForm@6000000 : Form 58888; CheckReturnedOption@6000002 : 'Equal,Less,Greater'; CheckReturnedDecimal@6000003 : Decimal; BEGIN ConfirmForm.SetConfirmText('Do you confirm variable value ' + FORMAT(SomeVar) + '?'); ConfirmForm.LOOKUPMODE := TRUE; IF ConfirmForm.RUNMODAL = ACTION::LookupOK THEN BEGIN ConfirmForm.GetValues(CheckReturnedOption,CheckReturnedDecimal); MESSAGE('Confirmed :)\Returned values %1 and %2',CheckReturnedOption,CheckReturnedDecimal); END ELSE MESSAGE('Not confirmed :('); END; } { 6000001;TextBox ;550 ;440 ;2420 ;440 ;SourceExpr=SomeVar } } CODE { VAR SomeVar@6000000 : Decimal; BEGIN END. } } OBJECT Form 58888 Confirm Form { OBJECT-PROPERTIES { Date=04/08/16; Time=[ 3:40:08 PM]; Modified=Yes; Version List=; } PROPERTIES { Width=8140; Height=4070; CaptionML=ENU=Confirm; BorderStyle=Double; Minimizable=No; Maximizable=No; Sizeable=No; } CONTROLS { { 6000000;CommandButton;550;2970;1650 ;880 ;Focusable=No; PushAction=LookupOK; CaptionML=ENU=Yes } { 6000001;CommandButton;2420;2970;1650;880 ;Focusable=No; Cancel=Yes; PushAction=LookupCancel; CaptionML=ENU=No } { 6000002;TextBox ;110 ;220 ;4510 ;2420 ;Editable=No; HorzAlign=Center; VertAlign=Center; MultiLine=Yes; SourceExpr=ConfirmText } { 6000003;OptionButton;5830;990 ;1100 ;440 ;CaptionML=ENU=< 0; SourceExpr=ReturnValue1; OptionValue=lt } { 6000004;OptionButton;5830;1540;1100 ;440 ;CaptionML=ENU="= 0"; SourceExpr=ReturnValue1; OptionValue=eq } { 6000005;OptionButton;5830;2090;1100 ;440 ;CaptionML=ENU=> 0; SourceExpr=ReturnValue1; OptionValue=gt } { 6000006;Label ;4840 ;330 ;3080 ;440 ;HorzAlign=Center; LeaderDots=No; CaptionML=ENU=Some Option to return } { 6000007;TextBox ;5500 ;3410 ;1700 ;440 ;SourceExpr=ReturnValue2 } { 6000008;Label ;4730 ;2750 ;3300 ;440 ;ParentControl=6000007; HorzAlign=Center; LeaderDots=No; CaptionML=ENU=Some Decimal to return } } CODE { VAR ConfirmText@6000000 : Text[1024]; ReturnValue1@6000001 : 'eq,lt,gt'; ReturnValue2@6000002 : Decimal; PROCEDURE SetConfirmText@6000000(NewText@6000000 : Text[1024]); BEGIN ConfirmText := NewText; END; PROCEDURE GetValues@6000003(VAR ReturnedOption@6000000 : 'eq,lt,gt';VAR ReturnedDecimal@6000001 : Decimal); BEGIN ReturnedOption := ReturnValue1; ReturnedDecimal := ReturnValue2; END; BEGIN END. } }
Answers
You may try to create a Page or use Dotnet to show a dialog.
I saw many people asking this question "How to restrict users using Enter Key". So First of all let me tell you Yes it's Possible and therefore finally I decided to find a way and introduce here in my Blog. Please check if this too helps you.
https://rockwithnav.wordpress.com/2016/03/25/disable-specific-keyboard-keys-single-line-of-code/
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
Reports transformation to RDLC
List -1h , Complex List -3h, Document -4h (dev hours)
navisionupgrade.com
Ok, I did that and its the solution.
But, how can I return the value of YES/NO to first form ?.
Reports transformation to RDLC
List -1h , Complex List -3h, Document -4h (dev hours)
navisionupgrade.com
Pay attention to properties PushAction and Focusable on Confirm form.
It is simply perfect.
Thanks !!!