Skip to main content
Solved

FSM Block image from gallery


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
Did this topic help you find an answer to your question?

10 replies

Forum|alt.badge.img+6
  • Do Gooder (Partner)
  • 36 replies
  • March 14, 2024

@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)
  • 13 replies
  • March 14, 2024

Hi @IniNimesK 

 

Do you have any idea how I can do this?


Forum|alt.badge.img+6
  • Do Gooder (Partner)
  • 36 replies
  • March 14, 2024
rodrigocivil18 wrote:

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)
  • 55 replies
  • Answer
  • March 14, 2024

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)
  • 13 replies
  • March 14, 2024

Thanks @Chethana ,

 

I’ll try and return with the results.


WilsonX
Sidekick (Employee)
Forum|alt.badge.img+5
  • Sidekick (Employee)
  • 23 replies
  • April 17, 2024

 

 

 

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


Chethana
Sidekick (Employee)
Forum|alt.badge.img+5
  • Sidekick (Employee)
  • 55 replies
  • April 17, 2024

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


WilsonX
Sidekick (Employee)
Forum|alt.badge.img+5
  • Sidekick (Employee)
  • 23 replies
  • April 17, 2024

@Chethana The problem also occurs on mobile.

 


Chethana
Sidekick (Employee)
Forum|alt.badge.img+5
  • Sidekick (Employee)
  • 55 replies
  • April 22, 2024

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


Forum|alt.badge.img+6
  • Do Gooder (Employee)
  • 16 replies
  • April 22, 2024

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings