Salesforce

How Do I Retrieve the Newly Entered Data of an Edit Control, Rich Edit Control, and Multi Choice (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Retrieve the Newly Entered Data of an Edit Control, Rich Edit Control, and Multi Choice List Box While Remaining on the Control? (Magic xpa 3.x)

When the user is typing data in a field, the changed field is not actually stored in the variable, or visible to handlers, until the user leaves the field. This is usually exactly what you want, because you do your validation etc. in control suffix, after the user leaves the field.

However, there are cases where you want the currently entered data before the user leaves the field. This would be the case when, for instance, the user is sitting on a field and hits a hot key to do something related to that field, such as a calculation.

Using EditGet()


  • Wherever you want to retrieve the current value of the field in an expression, type

    EditGet()

    or, type ed, then Ctrl+Spacebar, and use the auto complete pop-up.

EditGet() will be replaced by the data the user typed in when the event handler was invoked.

Note that EditGet() will work for any edit field, so the Expression Rules doesn’t know what data type will be returned. In the example above, if the user was parked on a numeric field and pressed F7, we’d get invalid results.

For this reason, you will probably want to use this in conjunction with the Control Name property or HandledCtrl(). See How Do I Identify from Which Control an Event Was Triggered?, and How Do I Define an Event Handler to Be Executed Only When the User is Parked on a Specific Control?.

See also

The Online and Rich Client Samples projects (program LG14 and RLG14)

Reference
Attachment 
Attachment