Solved

FSM Block image from gallery


Badge +5

Hi experts,

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?

icon

Best answer by Chethana 14 March 2024, 08:30

View original

10 replies

Badge +2

@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.

Badge +5

Hi @IniNimesK 

 

Do you have any idea how I can do this?

Badge +2

Hi @IniNimesK 

 

Do you have any idea how I can do this?

Hi,

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.

Userlevel 3
Badge +4

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

 

Badge +5

Thanks @Chethana ,

 

I’ll try and return with the results.

Badge +4

 

 

 

@Chethana I tested this solution, but it didn't work, any ideas?

Userlevel 3
Badge +4

Hi @WilsonX , are you using Windows client to test this?

Badge +4

@Chethana The problem also occurs on mobile.

 

Userlevel 3
Badge +4

@WilsonX , Could you please let me know your client version?

Userlevel 1
Badge +6

Hi @Chethana ,

 

The client script is working well, but it is not working to survey screen. 

 

Do you know how to disable icons on the Survey Screen (SurveyDebrief1)?

 

Tks

 

 

Reply