Pass value from fill-in to Varaible Help

ebuabeng

New Member
hi all,



I develop in VB, now I have Design a GUI using Appsbuilder





with a Fill-in(by name txtStartDate with an initial value = 01/01/2005) in progress, i want to be able to pick the value i put into the fill-in ito a variable (v-StartDate) so i use the following assigment statement under a command button press event :





do



Assign

v-StartDate = txtStartDate .





Display V-StartDate .



When i ran this script, the program displays only the initial value(01/01/2005) on the form(even though i have changed or modified the initial value ).

If i modify the initial value in run mode and press the button



I still get the initial value....

In a nut shell , i want to be able to pick a value from a fill-in( i.e text box in VB ) into a variable and use it.



Can any one help me with this ?
 
reply for saving value in variable

hi,
U have to use screen-value atribute of progress.
like:
in leave event trigger:
assign
variable=fill-in-variable:screen-value.

Most probably it work.
Thanks.
 
The fill-in you are using is a variable in itself.

All you have to do is either assign the fill-in. That way you do not need to create an extra variable and you can save some overhead. Something like the following should do the trick:
Code:
ASSIGN FRAME {&FRAME-NAME} txtStartDate.
MESSAGE txtStartDate VIEW-AS-ALERT-BOX.
 
Psc

For the Progress 4GL example you will need to do like this:

ASSIGN var-whatever = "string-text-here".

DO WITH FRAME {&FRAME-NAME}:

ASSIGN villin-widget-name:SCREEN-VALUE = var-whatever .

END.
 
Back
Top