We have a request from our customer who wants the field technician not to be able to attach an image from his device's library. Only a photo taken by the camera.
How do I block this functionality of attaching files to the device's gallery?
Best answer by Chethana
Hi @rodrigocivil18,
You can hide below icons in DebriefAttchmentList screen using client script.
DebriefAttachmentList screen
Write a new mobile client script and use the script below to hide icons in the attachment screen. Then, add your script to the DebriefAttachmentList screen refresh script option.
Client script to hide attachment list screen icons
In your case, you can use the ATTACHMENT_WIDGET_FILE to prevent the technician from adding photos from his gallery to the application.
After adding, setControlVisibility('ATTACHMENT_WIDGET_FILE',false)Add your client script in here
@rodrigocivil18 as far as i know this is not possible to do from Configurations so you might have to customize the mobile application and change it from the source code itself.
Easiest way to do is by just hiding the icon from the xml file within the code (for android) because the requirement is just don’t allow the user to attach from device storage. I don’t know the exact file name, but a developer should be able to debug them.
But do keep in mind that customizing the mobile application comes with some overhead such as uplifting the code during FSM version upgrades.
You can hide below icons in DebriefAttchmentList screen using client script.
DebriefAttachmentList screen
Write a new mobile client script and use the script below to hide icons in the attachment screen. Then, add your script to the DebriefAttachmentList screen refresh script option.
Client script to hide attachment list screen icons
In your case, you can use the ATTACHMENT_WIDGET_FILE to prevent the technician from adding photos from his gallery to the application.
After adding, setControlVisibility('ATTACHMENT_WIDGET_FILE',false)Add your client script in here
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.