Clipboard

Hi

I would like to paste a field from another form into the current RichTextField at the current position - I have tried everything but cannot seem to get it to work :o(

==============> start of code <===============

REM { get the field that I want to copy };

fieldName := @PickList ([Custom]:[Single]; “” ;“vwTBSMergeFieldsDBLookup” ; “Bitte Selektieren”; “Bitte Textbausteil Feld wählen” ; 2);

@If (fieldName = “”; @Return (“”); “”);

REM { place it into a temp field and copy this to the clipboard };

FIELD fldTmp := fieldName;

@Command ([EditGotoField]; “fldTmp”);

@Command ([EditSelectAll]);

@Command ([EditCopy]);

FIELD fldTmp := “”;

REM { now paste it into the RTF };

@Command ([EditGotoField]; “fldRTF”);

@Command ([EditPaste]);

==============> end of code <===============

this works very sporadically. Sometimes I have the field in the Clipboard, othertimes not…

I can get the data copied into the clipboard if I use @PostedCommand and don’t try and place it into the copied data into the RFT but just inform the user that s/he can now paste! Unfortunatly I then also loose my current position in the RTF and the user needs to go back to the edit position before pasting :o(

Any ideas?

Thanking you for any help given!

Ursus Schneider

Subject: [EditGotoField] wants a text string for the field name.

you are telling it to goto “fldTmp” which I assume does not exist on your form…

REM { get the field that I want to copy };

fieldName := @PickList ([Custom]:[Single]; “” ;“vwTBSMergeFieldsDBLookup” ; “Bitte Selektieren”; “Bitte Textbausteil Feld wählen” ; 2);

@If (fieldName = “”; @Return (“”); “”);

REM { place it into a temp field and copy this to the clipboard };

@Command ([EditGotoField]; fieldName);

@Command ([EditSelectAll]);

@Command ([EditCopy]);

REM { now paste it into the RTF };

@Command ([EditGotoField]; “YourRealFieldName”);

@Command ([EditPaste]);

Subject: RE: [EditGotoField] wants a text string for the field name.

I always try to use the native OS style of field. The reason being is that I have found that when using the Notes style the select/copy function is very consistently inconsistent.For example:

A Notes style text field that is computed can be copied in Read mode but not in edit mode.

An OS Style computed field can be copied in either mode.

The list goes on… The OS style generally works in either mode.