Skip to main content
Solved

FSM Block image from gallery

  • Mar 13, 2024 7:52 PM UTC
  • 10 replies
  • 185 views

rodrigocivil18
Do Gooder (Employee)
Forum|alt.badge.img+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?

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

 

View original

10 replies

Forum|alt.badge.img+6
  • Hero (Partner)
  • Mar 14, 2024 5:23 AM UTC

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


rodrigocivil18
Do Gooder (Employee)
Forum|alt.badge.img+5
  • Author
  • Do Gooder (Employee)
  • Mar 14, 2024 5:27 AM UTC

Hi @IniNimesK 

 

Do you have any idea how I can do this?


Forum|alt.badge.img+6
  • Hero (Partner)
  • Mar 14, 2024 5:37 AM UTC

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.


Chethana
Sidekick (Employee)
Forum|alt.badge.img+5
  • Sidekick (Employee)
  • Answer
  • Mar 14, 2024 7:30 AM UTC

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
Do Gooder (Employee)
Forum|alt.badge.img+5
  • Author
  • Do Gooder (Employee)
  • Mar 14, 2024 4:10 PM UTC

Thanks @Chethana ,

 

I’ll try and return with the results.


WilsonX
Sidekick (Employee)
Forum|alt.badge.img+6
  • Sidekick (Employee)
  • Apr 17, 2024 9:29 AM UTC

 

 

 

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


Chethana
Sidekick (Employee)
Forum|alt.badge.img+5
  • Sidekick (Employee)
  • Apr 17, 2024 1:39 PM UTC

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


WilsonX
Sidekick (Employee)
Forum|alt.badge.img+6
  • Sidekick (Employee)
  • Apr 17, 2024 3:47 PM UTC

@Chethana The problem also occurs on mobile.

 


Chethana
Sidekick (Employee)
Forum|alt.badge.img+5
  • Sidekick (Employee)
  • Apr 22, 2024 9:32 AM UTC

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


Forum|alt.badge.img+6
  • Sidekick (Employee)
  • Apr 22, 2024 1:38 PM UTC

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