Show/Hide Toolbars

PerfectApps ® Help Guide

Navigation: Resources > Example Applications

Checking File Attachments

Scroll Prev Top Next More

In the File Attachment Properties section, it's possible to restrict the file types to image or text files.

If a more specific restriction is required, behavior can be used to do this.

 

In this example, we will demonstrate how to do this using the following steps.

 

1.Identify and record the position of the period that separates the file name from the extension and place that into a normally hidden helper field.

2.Use this position information to extract the extension and place that into another normally hidden helper field.

3.Convert the extension into lower case.

4.Compare the extension to the required type and if it doesn't match, display a warning message.

 

Check the logic on the 'Check Button is pressed' event.

 

To get the most out of this example, you should have a knowledge of Behavior.

 

flag_green

To download this app, click here. Then extract and import the app. Log on to PerfectApps, go to the Apps Workspace and click the Import button. Then select the app file you saved locally (.PA or .PF) and continue through the import steps.

 

To learn how to import an app into your account see App Management Video Tutorials

 

 

Return to Example Applications