The Field State assigned to a File Attachment object will determine what a user may do with that object.
For more information on Field States please check Limiting User Access to App Fields.
When a File Attachment object is ready for a file to be attached, it would normally be in the 'Normal' state. The button would be enabled and the default text on the button would be 'Attach', although this can be modified in the object properties.
State is Normal, no object is attached.
Once a file has been attached and is still in the 'Normal' state, the button will still be enabled, and the default text on the button will be 'Detach', although this can be modified in the object properties. The name of the attached file is displayed adjacent to the button. The default position is to the right of the button, which can also be modified in the object properties.
Clicking on the Detach button will remove the file from the app instance.
Clicking on the file name will allow the user to downloaded a copy of the file.
State is Normal, an object is attached.
To prevent the file from being detached (removed from the app) but still allowing for a copy to be downloaded, the File Attachment object should be placed in the 'Read-Only' state. The Detach button will be disabled but the file name will remain enabled.
State is Read-Only, an object is attached
To prevent the file from being detached and to prevent a copy from being downloaded, the File Attachment object should be placed in 'Disabled' state. The Detach button and the file name are both disabled. Another option would be to place the object in the 'Hidden' state.
State is Disabled, an object is attached.
Working with Attached Files (3 min) |
Learn about the different parameters of a File Attachment object and how to use them with PerfectApps behaviors. |
|
Working with Pictures (2 min) |
If an image file is attached to an app it's possible to display that image in the app. Watch this tutorial to find out how it's done. |
See also: Previewing an App
Return to: Designing an App