4D v16

4D Write Plug-in

Home

 
4D v16
4D Write Plug-in

4D Write Plug-in    


 

 

The documents created are available both in single-user mode but also in client/server mode on all the machines that use the database.

Of course, 4D Write is programmable, but that's not the purpose of this video.

You can also combine the possibilities of plugins by saving, for example, a 4D Write document in PDF format that you can then attach to an e-mail.

Some plug-ins are available with 4D by default (4D Internet Commands, 4D Pack, etc.). We recommend that you install them for your project.These days, it’s rare that you develop an application without having to take into consideration FTP flows, sending/receiving e-mail or programmed startup of other applications.

It’s also possible to develop your own plug-ins using the “Plug-in SDK”. This tool lets you set your input points, input and output variables, as well as numerous parameters linked to generating code.You can then generate your project. The library call code is automatically generated. All that’s left is to write your specific code.

Plug-ins bring flexibility and power to your application. We recommend that you check out the list of available plug-ins provided by 4D SAS, as well as third-party plug-ins. In most cases, you’ll save a lot of time by taking advantage of someone else’s work - where not only is it already done, but also maintained, by others who had exactly the same problems as you!

In this video, we're going to learn how to integrate the 4D Write plug-in so as to give you the know-how to use word-processing functions within a 4D application.

Let’s start by installing the plug-in:

  • Quit your application.
  • Create a folder named “Plugins” in your database (remember that on a Mac, it's a package)
  • Drag the 4D Write plug-in into the Plugins folder.

Re-launch 4D.

To make sure the plugin is installed properly, check the Tools menu and you see that 4D Write is available to be used as a stand-alone word processor.

Our goal is to create an area in the Input form of the Interventions table where we can enter text in order to write an intervention report.

We select the Plugin tool and draw an area.
In the area properties, we're going to indicate that the plug-in type is "4D Write" and then name it "Report".

4D indicates that "4D Write could automatically save data in the picture or blob field if it existed". Here we're talking about an automatic record.

So in the structure, we'll create the corresponding Report_ field as a blob.

Back in the form, 4D displays the following message automatically:"4D Write will automatically save data in the field Report_".

Let's test to see if it works:

  • First we display all the interventions
  • Double-click on an intervention
  • Below we see the 4DWrite area where we can enter text
  • And when we move from record to record, the information is automatically saved.

In this area, we can add pictures or any graphic elements required that are available in the word processor.

Let's look at a detail concerning page layout. We set the comment and the technician's e-mail so that they grow and move with the window; we're going to change this so that when we work in full-screen mode, we won't have this inconvenience.

So we need to request:

  • that the comment does not grow
  • that technician's e-mail no longer moves
  • and that the 4D Write area grows wider and taller.

Going back to the form, if we enlarge the area, we now see the desired behavior.

You can refer to the documentation to learn about all the functions available in 4D Write, such as:

  • being able to insert 4D expressions; in other words, inserting fields, methods, etc.
  • pictures obviously
  • and being able to perform mail integration using multi-table data from the database.

In the documentation, you'll also find a series of examples that will help you go further using this plugin.

 
 

 
PROPERTIES 

Product: 4D
Theme: 4D Write Plug-in

 
HISTORY 

 
ARTICLE USAGE

Self-training ( 4D v16)