Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 6

How to return value from call to dialog box


I have code below which opens a custom dialog box which I created. When I call my dialog box I pass in a value for nPut, as I initailize it to the word "Test".  When my dialog box code is called I change the value of nPut, but when the dialog box closes and control returns on line 4 the value for nPut is still the value which I originally assigned to it "Test". That is even thought I changed the value in the dialog .rul code. So how can I permanently change the value for nPut so that the value is returned on line 4 below? In C# we can do this by passing by reference.




1. string nPut;

2. nPut="Test";

3. Dlg_GetCashPreference:

4. nResult= dlgAskForPreference(nPut); 

Labels (1)
0 Kudos
(1) Reply

Hi @ralphster ,


You can achieve that by defining the method parameter as BYREF

See the below example:

prototype object TestReference(BYREF STRING);

function object TestReference(strobj)

strobj = "TestREturn";
return strobj;




strTest = "TestCall";
strReturn = TestReference(strTest);  



0 Kudos