Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clarion 5.5 - clear entry control 1

Status
Not open for further replies.

mlowe9

Programmer
Apr 3, 2002
221
US
Hi everyone, new to Clarion programming.

I need to clear the value of an entry control. I'm sure it's very simple, but I've already spent too much time trying to figure out how.

Any help is greatly appreciated.
 
Update: I was clearing the control correctly, using the variable associated to the control (with USE). I can tell because if I click in the control, the value disappears. So do I need to refresh the form, or the control, and how?
 
Hi!

When you put an entry control for a field/column called FIL:Column it has an associated Field Equate Label (FEQ) called ?FIL:Column.

So, to clear an entry control, you could do it in 3 ways :

1. From the Column to the Window Control
CLEAR(FIL:Column) ; DISPLAY(?FIL:Column) ! Works on all Column Types
or
FIL:Column = '' ; DISPLAY(?FIL:Column) ! String Column
or
FIL:Column = 0 ; DISPLAY(?FIL:Column) ! Numeric/Date Column

2. From the Window Control to the Column
ERASE(?FIL:Column) ; UPDATE(?FIL:Column)

3. From the Window Control to the Column
CHANGE(?FIL:Column, '')

Regards
 
When you change the USE variable you need to DISPLAY the contents, this copies the new value of the variable to the screen. You can DISPLAY(?OneField) or DISPLAY() which updates all of them.

Another approach is to put the ,AUTO attribute on the Window, this will automatically do a DISPLAY for you every time you move through the ACCEPT loop.

If you have a control that does NOT have a USE variable, then you can use CHANGE(?FieldEquate, NewValue) conversely you can use CONTENTS(?FieldEquate) to get the contents. Also ?FieldEquate{prop:Text} or {prop:ScreenText} can be used to get/set the contents -- in many cases prop:Text is used for the PICTURE not the value.

HTH
Mark Goldberg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top