Attachments are not added to the table using mobile app builder set field values

mohcine elbah
Tera Contributor

Hello,

I ran across this issue when trying to map each field in my input form screen to their corresponding field in the back-office table, this is working for string fields but not working for attachment fields, when I take a photo using now agent and submit the form, the record is created successfully, and the string values are also added to the record, but the photos are not added to the record.

 

1 REPLY 1

Sanjay191
Tera Sage

Hello @mohcine elbah 

 

I’ve come across a similar issue recently and wanted to share a solution that worked in my case. Please follow the steps below — I hope this will also work for you.

The limitation here is that you cannot directly map or set an attachment into an attachment-type field from Mobile Agent. To handle this, you’ll need a bit of customization:

  1. Business Rule Setup

    • Create a Business Rule on the target table (where the attachment field exists).

    • This rule should run when an attachment is added to the record.

    • Inside the rule, use server-side logic to associate or move the uploaded file into the designated attachment field.

  2. Mobile Configuration

    • Ensure that the mobile form/view is configured to allow attachments to be uploaded against the record.

    • Once the file is uploaded through Mobile Agent, it will be linked to the record itself.

    • The Business Rule will then pick it up and populate the attachment field automatically.

This way, instead of trying to set the attachment field directly (which isn’t supported in Mobile Agent), you’re letting the platform handle the attachment at the record level and then pushing it into the correct field via server-side logic.

please refer the below screenshots

Sanjay191_0-1758620367589.png

 

Sanjay191_1-1758620387967.png


you need to  do some mobile configuration for this you need to create the action item to attach the attachment to the target record. please refer  below  action item script logic 

Sanjay191_2-1758620469439.png

 


If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You!!