So, an alternative is to have a page with an embedded view showing the documents list from where the user will choose the document to link to, and then call this page on a dialog box.
On the page's QueryClose event, add this:
@Command([EditMakeDocLink])
And on the form where the RichTextField is, add a button or an Action with a formula similar to this:
@DialogBox( "pg_name" ; [AutoHorzFit] : [AutoVertFit] : [NoNewFields] :
[NoFieldUpdate] : [SizeToTable] : [ReadOnly] ; "Insert Doc Link" );
@Do
( @PostedCommand([EditGotoField];"rtf_field_name");
@PostedCommand([EditInsertText]; @NewLine);
@PostedCommand([EditInsertText]; "Document link: ");
@PostedCommand([EditInsertText]; @NewLine);
@PostedCommand([EditInsertText]; @NewLine);
@PostedCommand([EditLeft];"2"); @PostedCommand([EditPaste]))
No comments:
Post a Comment