Difference between revisions of "Custom Field Type: Upload - Single File Storage"

From SmartWiki
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
==General Description==
 +
Stores a single file into a single field. This field type is used to store a single uploaded document.
  
==General==
+
==Field Illustrated==
Stores a single file into a single field.  This field type is used to store a single uploaded document.
 
 
 
==Field Illustrated==
 
 
 
 
[[Image:Cf_sf_ex2.png]]
 
[[Image:Cf_sf_ex2.png]]
 
==Field==
 
 
* '''Field type''': The list of available Field Types
 
* '''Field Name''': The name of the field, used internally to reference the user's input.
 
* '''Description''': Definition and general description of the custom field. Will not be displayed.
 
 
 
==Display==
 
* '''Display Order''': The order (relative to other fields) in which this field is displayed.
 
* '''Tab Name''': Displays the field under a given [[Tabs_(Disambiguation)#Custom_Field_Tabs|tab]].
 
* '''[[Caption]]''': The leading question or prologue before the field. If left blank, the Field Name will be displayed as the caption.
 
* '''Caption Location''': Determines the positioning and visibility of the [[caption]] relative to the field.  Options include: Left of Field, Above Field, No Caption, Hide Caption. '''Note:''' this option was previously called '''Label Display'''. ([[Label Display Options|See examples here.]])
 
* '''Instructions''': Text input here displays under the caption. If caption has Hide Caption enabled then any defined instructions will continue to be displayed above the input.
 
{{ButtonLabel}}
 
{{ToolTip}}
 
{{HideFieldForNewRecord}}
 
{{SmartFieldView}}
 
{{SmartFields PDF Formatting}}
 
 
 
{{OptionsTab}}
 
* '''Mandatory:''' (Only available if [[SmartCheck Validation]] is enabled) - System will validate that a file has been uploaded to this field.
 
{{AppearMandatory}}
 
{{TrackChanges}}
 
{{DisableFromGlobalSearch}}
 
'''Note:''' Changes to file name, upload date and user name only are tracked. File versions are not retained.
 
 
==Validation==
 
 
* '''[[Validation Message|Validation Error Message]]'''<br>
 
  
{{FileOptions}}
+
==Field Options==
 +
All common options:<br />
 +
[[Custom Fields - General Information #General_Settings|General Settings]]<br />
 +
[[Custom Fields - General Information #Role Field Permissions and Status Field Permissions|Permissions & Availability]]<br />
 +
[[Custom Fields - General Information #Classic Options|Classic Options]]<br />
 +
For further information, please refer to [[Custom Fields – General Information]].<br /><br />
 +
Options listed below are specific to this particular field type.
  
 
{{SecurityOptions}}
 
{{SecurityOptions}}
Line 46: Line 19:
 
{{RealTimeVirusScan}}
 
{{RealTimeVirusScan}}
 
''Other Options''
 
''Other Options''
 +
 
* '''File Indexing''' – enable file indexing and full text searching using the Lucene full text search engine, which is built into [[SmartSimple]].
 
* '''File Indexing''' – enable file indexing and full text searching using the Lucene full text search engine, which is built into [[SmartSimple]].
* '''Create Optimized Image Version''': If checked, a small version (thumbnail) will be created when the user uploads an image. The thumbnail image will be compressed and restricted to 1024 pixels wide. The thumbnail can be called using the syntax @fieldname.compressedlink@. This feature is intended to improve the load time of pages displaying many high resolution images.  
+
* '''Create Optimized Image Version''': If checked, a small version (thumbnail) will be created when the user uploads an image. The thumbnail image will be compressed and restricted to 1024 pixels wide. The thumbnail can be called using the syntax @fieldname.compressedlink@. This feature is intended to improve the load time of pages displaying many high resolution images.
 
* '''Enable Annotation''' – allows users to add [[PDF Annotation|annotations]] to uploaded PDF documents from within the SmartSimple system.
 
* '''Enable Annotation''' – allows users to add [[PDF Annotation|annotations]] to uploaded PDF documents from within the SmartSimple system.
 
* '''Disable Email Button''' - Removes the ability of users to e-mail the file directly from within [[SmartSimple]].
 
* '''Disable Email Button''' - Removes the ability of users to e-mail the file directly from within [[SmartSimple]].
* '''No Deletion''' – suppress the [[User|user’s]] ability to delete any files stored in the field, and manager permission is required by the [[User|user]] to delete an '''Allow Delete Multiple Files Fields'''
+
* '''Disable Delete''' – suppress the [[User|user’s]] ability to delete any files stored in the field, and manager permission is required by the [[User|user]] to delete an '''Allow Delete Multiple Files Fields'''
* {{FileTypeRestriction}}<br />
+
* '''Enable Excel Parsing''' - parse an uploaded Excel file and populate mapped fields based on the file's content.
* '''File Name Restriction''' - Allows you to enforce a file naming convention on files uploaded to SmartSimple. See the [[File Name Restriction]] page for more information.<br />
+
* {{FileTypeRestriction}}
* '''Maximum File Size''' - drop-down with options to allow a limit on the file upload size<br />
+
* '''File Name Restriction''' - Allows you to enforce a file naming convention on files uploaded to SmartSimple. See the [[File Name Restriction]] page for more information.
* '''Workflow on Upload''' - Allows you to define a [[Workflow]] that will be triggered whenever a file is uploaded to this field.<br />
+
* '''Maximum File Size''' - drop-down with options to allow a limit on the file upload size
 
+
* '''Workflow on Upload''' - Allows you to define a [[Workflow]] that will be triggered whenever a file is uploaded to this field.
 
 
{{Formatting}}
 
{{CaptionStyle}}
 
 
 
 
 
{{CFPermissionsTab}}
 
  
 
<!--
 
<!--
{{FileSizeUpload}}
+
<span class="mceNonEditable template" id="bs_template:@@@TPL17@@@" data-bs-name="FileSizeUpload" data-bs-type="template" data-bs-id="17"><span class="mceNonEditable template" id="bs_template:@@@TPL12@@@" data-bs-name=" FileSizeUpload" data-bs-type="template" data-bs-id="12"><span class="mceNonEditable template" id="bs_template:@@@TPL7@@@" data-bs-name="  FileSizeUpload" data-bs-type="template" data-bs-id="7">{{   FileSizeUpload }}</span></span></span>
 
-->
 
-->
 
 
==Special Field Options==
 
==Special Field Options==
 
===[[Indexing Multiple and Single File Fields]]===
 
===[[Indexing Multiple and Single File Fields]]===
 
The '''Link Multiple File Field''' and the '''Link Single File Field''' both support a file index feature. Using this feature provides the ability to search documents attached to the field (subject to the [[User|user]] having permission to access the field).
 
The '''Link Multiple File Field''' and the '''Link Single File Field''' both support a file index feature. Using this feature provides the ability to search documents attached to the field (subject to the [[User|user]] having permission to access the field).
+
 
 
<u>'''File Types Supported'''</u>
 
<u>'''File Types Supported'''</u>
* When you add a document to this file you must make sure that the document can be indexed for searching. The following types of documents are supported: Microsoft Word and Excel, Adobe PDF, HTML and RTF files.
+
 
 +
* When you add a document to this file you must make sure that the document can be indexed for searching. The following types of documents are supported: Microsoft Word and Excel, Adobe PDF, HTML and RTF files.
  
 
<u>'''Ensuring that PDF Files are searchable'''</u>
 
<u>'''Ensuring that PDF Files are searchable'''</u>
* If using PDF you must ensure that the files are text-searchable. You can test for this functionality by opening the file with Adobe Acrobat Reader and ensuring that the '''Select Text''' tool can be used to select text from the file.
+
 
 +
* If using PDF you must ensure that the files are text-searchable. You can test for this functionality by opening the file with Adobe Acrobat Reader and ensuring that the '''Select Text''' tool can be used to select text from the file.
  
 
<u>'''Indexing after uploading'''</u>
 
<u>'''Indexing after uploading'''</u>
*The '''indexing''' function takes place when the file is first uploaded so if you decide to index a file after the file is uploaded you must re-index the field. Use the following steps to index the field:
+
 
 +
* The '''indexing''' function takes place when the file is first uploaded so if you decide to index a file after the file is uploaded you must re-index the field. Use the following steps to index the field:
 +
 
 
# Locate and edit the [[Custom Field]].
 
# Locate and edit the [[Custom Field]].
 
# Click the '''File Index''' check box.
 
# Click the '''File Index''' check box.
Line 85: Line 56:
 
# Click the option button '''Re-index all files in this field now!'''
 
# Click the option button '''Re-index all files in this field now!'''
 
# Click the '''Save''' button.
 
# Click the '''Save''' button.
+
 
 
<u>'''Disabling a File Index'''</u>
 
<u>'''Disabling a File Index'''</u>
 +
 
* If you wish to disable the '''File Index''' function and no longer make attached files searchable use the following steps:
 
* If you wish to disable the '''File Index''' function and no longer make attached files searchable use the following steps:
 +
 
# Locate and edit the [[Custom Field]].
 
# Locate and edit the [[Custom Field]].
 
# De-select the '''File Index''' check box.
 
# De-select the '''File Index''' check box.
Line 93: Line 66:
 
# Click the '''File Index''' button in the action bar.
 
# Click the '''File Index''' button in the action bar.
 
# Click the option button '''Remove index from all files in this field now!'''
 
# Click the option button '''Remove index from all files in this field now!'''
# Click the '''Save''' button.
+
# Click the '''Save''' button.
 +
 
  
  
 
===[[Display Additional File Attributes for PDF Documents]]===
 
===[[Display Additional File Attributes for PDF Documents]]===
* If the '''Single File''' field is going to store a PDF file, you can also create a [[Custom Field Type: Read Only – System Variables|Read Only - System Variables]] field to display additional attributes about the file (called Meta Data).  
+
* If the '''Single File''' field is going to store a PDF file, you can also create a [[Custom Field Type: Read Only – System Variables|Read Only - System Variables]] field to display additional attributes about the file (called Meta Data).
* The additional attributes that can be extracted and displayed are: author, creator, producer, keywords, subject, title, number of pages, creation date and modified date.  
+
* The additional attributes that can be extracted and displayed are: author, creator, producer, keywords, subject, title, number of pages, creation date and modified date.
 
* See [[Display Additional File Attributes for PDF Documents]] for details on how this is accomplished.
 
* See [[Display Additional File Attributes for PDF Documents]] for details on how this is accomplished.
  
Line 113: Line 87:
 
See also: [[Online File Editing]].
 
See also: [[Online File Editing]].
 
-->
 
-->
 
 
===Emailing Document===
 
===Emailing Document===
 
* The document stored within this file can be E-mailed from within [[SmartSimple]] by clicking the '''Lookup...''' button (which may have been re-labelled with the Button Label option described above) and then clicking '''Email'''.
 
* The document stored within this file can be E-mailed from within [[SmartSimple]] by clicking the '''Lookup...''' button (which may have been re-labelled with the Button Label option described above) and then clicking '''Email'''.
 +
  
  
Line 123: Line 97:
 
* '''.value''': the path (URL) of the file
 
* '''.value''': the path (URL) of the file
 
* '''.filename''': lists the name of the file (including extension such as .pdf, .doc etc)
 
* '''.filename''': lists the name of the file (including extension such as .pdf, .doc etc)
* '''.numOfpages''': if a PDF file is stored in the field the number of pages in the PDF document will be displayed.  
+
* '''.numOfpages''': if a PDF file is stored in the field the number of pages in the PDF document will be displayed.
 
* '''.uploadlink''': the URL that can be used to upload a file to the field.
 
* '''.uploadlink''': the URL that can be used to upload a file to the field.
  
 
===Examples===
 
===Examples===
 
Show number of pages:
 
Show number of pages:
 +
 
  @Contract Document.numOfpages@
 
  @Contract Document.numOfpages@
  
 
Upload file function using hyperlink:
 
Upload file function using hyperlink:
 +
 
  <a href="@Additional Files.uploadlink@" target="_blank">Click Here to upload</a>
 
  <a href="@Additional Files.uploadlink@" target="_blank">Click Here to upload</a>
  
 
Upload file function as a button:
 
Upload file function as a button:
  <input type="button" class="Button" onclick="cs=window.open('@Additional Files.uploadlink@','cs_window',
+
 
'toolbar=0,width=600,height=400,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no,alwaysRaised=no');cs_window.focus();"  
+
  <input class="Button" type="button" value="Upload File" />
value="Upload File" />
 
  
 
Calculate the length of the uploaded filename (for use in validation, will work for non-PDF file types, will return 0 if no file uploaded).
 
Calculate the length of the uploaded filename (for use in validation, will work for non-PDF file types, will return 0 if no file uploaded).
 +
 
<pre><!--@sscalculation(length("@Budget Upload.filename@"))--></pre>
 
<pre><!--@sscalculation(length("@Budget Upload.filename@"))--></pre>
  
Line 144: Line 120:
 
==Notes==
 
==Notes==
 
* Commas in the file names of uploaded files will be replaced automatically with underscore characters ("_"). This is to prevent errors with JavaScript execution.
 
* Commas in the file names of uploaded files will be replaced automatically with underscore characters ("_"). This is to prevent errors with JavaScript execution.
 +
  
  

Latest revision as of 12:45, 26 November 2018

General Description

Stores a single file into a single field. This field type is used to store a single uploaded document.

Field Illustrated

Cf sf ex2.png

Field Options

All common options:
General Settings
Permissions & Availability
Classic Options
For further information, please refer to Custom Fields – General Information.

Options listed below are specific to this particular field type.

Security Options

  • Allow External Access: if there is an externally enabled report that includes files in this Multiple Files field, anyone viewing the report will be able to click on the file names listed on the report for this Multiple Files field and view the underlying files.
  • Enable Online Editing - when enabled an edit button will appear next to the documents in this field that will allow users to edit the documents online. When the changes are saved the updated document will automatically be saved back into the appropriate Multiple Files field. (Note: documents with special characters such as apostrophes in the file name may not be editable) See Online Editing.
  • Real-Time Virus Scan - performs virus scan on uploaded documents

Other Options

  • File Indexing – enable file indexing and full text searching using the Lucene full text search engine, which is built into SmartSimple.
  • Create Optimized Image Version: If checked, a small version (thumbnail) will be created when the user uploads an image. The thumbnail image will be compressed and restricted to 1024 pixels wide. The thumbnail can be called using the syntax @fieldname.compressedlink@. This feature is intended to improve the load time of pages displaying many high resolution images.
  • Enable Annotation – allows users to add annotations to uploaded PDF documents from within the SmartSimple system.
  • Disable Email Button - Removes the ability of users to e-mail the file directly from within SmartSimple.
  • Disable Delete – suppress the user’s ability to delete any files stored in the field, and manager permission is required by the user to delete an Allow Delete Multiple Files Fields
  • Enable Excel Parsing - parse an uploaded Excel file and populate mapped fields based on the file's content.
  • File Type Restriction - Use this option to specify the only file types that may be uploaded, in a comma-separated list. Please note that file extensions (e.g., txt, jpg, pdf) must be in lower case. See the File Type Restriction page for further information.
  • File Name Restriction - Allows you to enforce a file naming convention on files uploaded to SmartSimple. See the File Name Restriction page for more information.
  • Maximum File Size - drop-down with options to allow a limit on the file upload size
  • Workflow on Upload - Allows you to define a Workflow that will be triggered whenever a file is uploaded to this field.

Special Field Options

Indexing Multiple and Single File Fields

The Link Multiple File Field and the Link Single File Field both support a file index feature. Using this feature provides the ability to search documents attached to the field (subject to the user having permission to access the field).

File Types Supported

  • When you add a document to this file you must make sure that the document can be indexed for searching. The following types of documents are supported: Microsoft Word and Excel, Adobe PDF, HTML and RTF files.

Ensuring that PDF Files are searchable

  • If using PDF you must ensure that the files are text-searchable. You can test for this functionality by opening the file with Adobe Acrobat Reader and ensuring that the Select Text tool can be used to select text from the file.

Indexing after uploading

  • The indexing function takes place when the file is first uploaded so if you decide to index a file after the file is uploaded you must re-index the field. Use the following steps to index the field:
  1. Locate and edit the Custom Field.
  2. Click the File Index check box.
  3. Click the Save button.
  4. Click the File Index button in the action bar.
  5. Click the option button Re-index all files in this field now!
  6. Click the Save button.

Disabling a File Index

  • If you wish to disable the File Index function and no longer make attached files searchable use the following steps:
  1. Locate and edit the Custom Field.
  2. De-select the File Index check box.
  3. Click the Save button.
  4. Click the File Index button in the action bar.
  5. Click the option button Remove index from all files in this field now!
  6. Click the Save button.


Display Additional File Attributes for PDF Documents

  • If the Single File field is going to store a PDF file, you can also create a Read Only - System Variables field to display additional attributes about the file (called Meta Data).
  • The additional attributes that can be extracted and displayed are: author, creator, producer, keywords, subject, title, number of pages, creation date and modified date.
  • See Display Additional File Attributes for PDF Documents for details on how this is accomplished.


Emailing Document

  • The document stored within this file can be E-mailed from within SmartSimple by clicking the Lookup... button (which may have been re-labelled with the Button Label option described above) and then clicking Email.


Variables

The following extensions can be used with Single File fields:

  • .value: the path (URL) of the file
  • .filename: lists the name of the file (including extension such as .pdf, .doc etc)
  • .numOfpages: if a PDF file is stored in the field the number of pages in the PDF document will be displayed.
  • .uploadlink: the URL that can be used to upload a file to the field.

Examples

Show number of pages:

@Contract Document.numOfpages@

Upload file function using hyperlink:

<a href="@Additional Files.uploadlink@" target="_blank">Click Here to upload</a>

Upload file function as a button:

<input class="Button" type="button" value="Upload File" />

Calculate the length of the uploaded filename (for use in validation, will work for non-PDF file types, will return 0 if no file uploaded).

<!--@sscalculation(length("@Budget Upload.filename@"))-->


Notes

  • Commas in the file names of uploaded files will be replaced automatically with underscore characters ("_"). This is to prevent errors with JavaScript execution.


See Also