"Allow Images Upload" in Mobile Agent does not insert the image into the table.

Narek
Kilo Contributor

Hello everyone,

 

I am working on an app in Mobile Agent.

I have an Action Function called New Service Request, that allows the users to create new records. The function is set to "Allow Images Upload". It works in a sense that the '+' sign does appear on the form and after choosing or taking a photo, the photo pops up on the right side of the '+' sign.

However, when I tap submit, and then view the records list using Mobile Agent, the record is there, but the image is not. I also check the sys_attachment table, and the image I uploaded does not appear in there either. 

How does attachment upload work, and how does it get stored in the app? 

Any help would be appreciated!

 

 find_real_file.png        find_real_file.png        find_real_file.png

1 ACCEPTED SOLUTION

Mike Gemma
Tera Expert

I wanted to add a real resolution to this issue since the link given is broken and I have also been struggling with this.

Image upload only works if the Table field is set, and the Table field is only visible if the context is set to Record.

In the sys_sg_button table where you created the function and selected "Allow images upload", you must change the function context to "Record" and then set the Table to Incident or whichever table you are using.  Save the record.  Then change the context back to "Global" and save again.

View solution in original post

14 REPLIES 14

David Ha
ServiceNow Employee
ServiceNow Employee
Hi Narek,

For the function configuration, please make sure that the table in the display condition section is selected.
 
Let me know if that fixes your issue.
 
When you upload an image, it should show up on your applet's activity stream and in your sys_attachment table.
 
Best,
David

 

Narek
Kilo Contributor

Hello David,

Thanks for your response!

 

Would you provide some screenshots of the display condition section? I am not sure where the section is.

This is what my Action looks like:

find_real_file.png

The condition has the name of the table.

 

Hope this helps.

Narek
Kilo Contributor

Hey David,

 

I will test your approach when I get a chance. The SNow team is now working on fixing an internal bug on the Quick Action that is used to upload images. For some reason, the quick action stopped working due to a bug in the system, and the development team in Service Now is trying to solve it. Once it is functional and I can test it, I will let you know if your suggestion does the trick, and mark your answer as the correct one.

I have the image upload functionality working now (before the quick action broke), and this is what I have changed to make it work. Unfortunately I don't remember exactly whether this trick was the solution of the problem, but I will share it with everyone so you can try it as well.

Basically, in the applet that is supposed to show the images, go to the details screen (under the Form Screen Segments).

find_real_file.png   

Then click on the field (or create a new one) that is supposed to contain the images/attachments.

  find_real_file.png

Then, make sure the Record Id Field is Sys ID. This is how the sys_attachment's table connects to your application's records. So we are telling the sys_attachments table to use the Sys ID of the record which needs its images to be displayed. I used to have something different for this field instead of the Sys ID, but once I figured out how the sys_attachment stores images (by using the table id of your application and the Sys ID of the record to which the image belongs to), I changed this.

find_real_file.png

 

 

Joshwa Antony S
Mega Guru

Hello Narek,

You are facing known error reported in following article, Please follow the workaround mentioned in this article

https://hi.service-now.com/kb_view.do?sysparm_article=KB0752097

I enabled "Allow Images upload" in my instance for Add Comments button [More option button] available for incident applets and its working as expected

https://<yourinstance>.service-now.com/nav_to.do?uri=sys_sg_button.do?sys_id=a905cca767302300b270c3105685ef0a

Give a try in this OOB applet button (sys_sg_button) and if its working there, compare you custom sys_sg_button with the OOB one which might help you to identify the missing peace.

Regards,

JAS