---
sourceDocument: Australia Mobile Configuration and Navigation
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/mobile

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Mobile Configuration and Navigation

ft:clusterId :

    - mobile

bundleId :

    - mobile

workflow :

    - Development, Data and Analytics


---

# Configure a scripted writeback action that saves a signature input

# Configure a scripted writeback action that saves a signature input {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Configure an action item's scripted writeback action that can save the signature
input in your input form screen.

## Before you begin

You must create an input form screen with signature inputs. For more information, see
[Configure input form screens with signature inputs](https://servicenow-prod.fluidtopics.net/LXARPQNAENZBA_Udmaayng "Configure input fields that your users can use to sign electronically on the input form screen. Users can sign on the screen or type their name to record their signature.").

In addition, you must have configured an action item to use for this input form
screen. For more information, see [Configure an action item](https://servicenow-prod.fluidtopics.net/yoKrBS4snk1zej1cWalP~A "For an action function to work, you must create an action item to associate with the action function. Action items define what the action function is and how it works.").

Role required: admin

## About this task

Admins can write scripts that perform the action and then save the signature inputs.
Alternatively, they can write scripts that save the signature first before
performing the action.

You can use the MobileSignatureHandler script include to save
signature inputs. The MobileSignatureHandler script include
saves the signature into the sys_attachment table and creates a relevant record in
the signature_image table.

You can also write custom code to handle saving your signature inputs. For
information about server-side scripting, see [Server-side
scripting](https://www.servicenow.com/docs/access?context=c_ServerScripting&version=australia&pubname=australia-api-reference&ft:locale=en-US).

## Procedure

1. Navigate to AllSystem MobileAction Items.
2. Select the action item that you want to use for the signature input.
3. Add the signature saving script in the Execution Script field.  
   For example, the following writeback action item script shows how the MobileSignatureHandler can be used to save the signature input:

       (function WriteBackAction(parm_input, parm_variable, actionResult) {
           var gr = new GlideRecord("incident");
           gr.get(parm_variable['sys_id']);
           var shortDesc = parm_input['shortDescInput'];
           gr.setValue("short_description", shortDesc);
           gr.update();
             // in this example "signatureInput" is the name of a sys_sg_input of type signature
             // SignatureType will return either "Image" or "Text"
           var signatureType = parm_input['signatureInput']["SignatureType"];
             // SignatureValue will return a String containing the base64 respresentation of the image in the case of a drawn signature
             // or a String with the name of the user if they typed their name
           var signatureValue = parm_input['signatureInput']["SignatureValue"];
           var table = "incident";
           var documentId = parm_variable['sys_id'];
           var signatureHandler = new sn_mobile.MobileSignatureHandler();
           if (signatureType == "Image")
               signatureHandler.insertSignatureImage(table, documentId, signatureValue);
           else if (signatureType == "Text")
               signatureHandler.insertTypedSignature(table, documentId, signatureValue);
       })(parm_input, parm_variable, actionResult);

4. Select Update to save the configuration.

*[\>]: and then


