Support > Repository > Application example > File sharing using URL
ja | en

You can also share files using URL type instead of file type. This way you can access the file of the file server.

  1. Define the model item type as "URL type".
  2. Please store the file you want to share in the folder of the file server.
  3. Upon data registration, up to the shared file placed on the file server"Windows network path" in URL formatI will write it.
For example, if the Windows network path notation is "\\ server001 \ fileshare \ catalog001.doc", register "file: //// server001 \ fileshare \ catalog001.doc" in the URL item.

Browser correspondence

Notation of each browser is as follows.

browser Notation
Internet Explorer file:////server001\fileshare\catalog001.doc
* FireFox format, Opera format can also be displayed.
FireFox file://///server001/fileshare/catalog001.doc
Opera file://server001/fileshare/catalog001.doc
Google Chrome (out of service)

In this way, a link to the shared file is displayed in the Web browser.Click this link to open the shared file. The edited contents of the shared file are saved in the file server.There is no need to re-register the shared file in the Wagby application.

This function is not available in Google Chrome.From the security point of view, it seems that the link function to the shared file can not be used.There is detailed information on this blog.

URL corresponds to Japanese folder name.

This method assumes that you can access the file server directly from the client PC.In other words, it is limited to the intranet.

  • If you can not access the file, please change the notation of the address bar part manually according to your web browser.(Example: To display "file: ////server001/fileshare/catalog001.doc" with Opera, change it to "file: //server001/fileshare/catalog001.doc".)
  • In order to avoid rewriting such an address bar part, we recommend that you use the same Web browser used by the user.
  • "MS11-057 KB2559049 After updating file: // Can not open shared file linked with protocolThe phenomenon called "phenomenon" has been reported.Applying this fix patch on Windows Update seems to be unable to open the shared file.As mentioned in the remedial measures of the site above, please add the server on which Wagby is running to the trusted site.

Here I will show you how to achieve the following requirements.

  • Register the path (entity of the file) to the file server using the URL type.
  • On the detail display screen, only "file name" is displayed.
  • Click on the file name so that you can access the file on the file server.
Fig.1 Implementation image

Example of execution

Figure 2 shows the new registration screen.Although it is the item name "file", actually enter the URL.The default value is file: (server name).

Figure 2 New registration screen

Figure 3 shows an example of entering the path to the file server.You can also use the Japanese file name.

Figure 3 Enter path to file server

After registration, only the file name is displayed.Actually it becomes a link displayed in the lower left of the screen.(Figure 4)

Figure 4 Detailed display screen

Model definition

The "file" item in Figures 2, 3, and 4 actually consists of three items for input, temporary calculation, and output.

Item name (Japanese) Item name (English) Item type Hidden (input) Hidden (output)
File (for input) urlitem String - URL
FINDTAIL (hidden) urlitem_FINDTAIL String
File (for output) urlitem_output String - URL
Figure 5 Model definition

File (for input) item

It is defined as an item used in the new registration/update screen.Set the initial value at the registration screen display as shown in Fig.Here is an example including (temporary) server name.

Figure 6 Let the initial value be file instead of http

Since it is not used on the detail screen, it is supposed to be a hidden item.

Figure 7 Output control> Hidden setting on detail screen

The item name on the screen display (in the new registration/update screen) is "file".

Figure 8 Setting label name for display

FINDTAIL (hidden) item

Only the file name part of the item entered by the function is extracted.

IF (NOT (ISBLANK ($ {urlitem})), MID ($ {urlitem}, FINDTAIL ("\\", $ {urlitem}) + 1), "")

Also, suppose you do not need to store the value in the database.

Figure 9 Calculation formulas and database retraction settings

Make it hidden by input and output respectively.(FIG. 10, FIG. 11)

Fig. 10 Input control> Specify hidden items in full screen
Fig. 11 Output control> Hidden item specification

File (for output) item

The link itself uses "file (for input)", but for the link display item, use the file name part obtained by "FINDTAIL (hidden) item".It is not necessary to save this item to the database.(FIG. 12)

Figure 12 Detailed setting of output items

It will be hidden when entering.(FIG. 13)

Figure 13 Input control> Specify hidden items in full screen

The item name on the screen display (on the detail screen) is "file".(FIG. 14)
Depending on the settings shown in Figures 8 and 14, it is actually a different item, but from the user it is treated as one "file" item.

Figure 14 Setting label name for display