---
sourceDocument: Australia Build or modify applications
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/application-development

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Step description generation script

# Step description generation script {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 min. de leitura

In a step configuration record, the step description generation script field determines
the step description that the system generates when a step of this type is added to a
test.

For an example showing how where the description generated by this script appears, see [Description generation script example](https://servicenow-prod.fluidtopics.net/9RHyPmUp7aAhmE6QCnAz~Q#atf-step-config-xmpls__b5m_zrx_yw).

## Step

The step parameter to `generateDescription()`{#atf-config-desc-script__q5v_plm_zw} gives the script access to the step object, which it turn gives
access to the input variables as defined in the step configuration record. (Input variables are
defined in a related list.)

For example, if -- in a step config record -- the inputs related list contains two records:
<var class="keyword varname">var1</var> and <var class="keyword varname">var2</var>, the script can reference
<var class="keyword varname">var1</var> with the expression `step.inputs.var1
and`{#atf-config-desc-script__r4y_nlm_zw} can reference <var class="keyword varname">var2</var> with `step.inputs.var2`{#atf-config-desc-script__asm_4lm_zw}.  

## Record Query description generation script


        (function generateDescription(step) {
        var td = GlideTableDescriptor.get(step.inputs.table);
        if (!td) {
             gs.log("Invalid table name in test step: " + step.inputs.table);
             return gs.getMessage("Set field values");
        }
        var descriptionGenerator = new ATFStepDescriptionGenerator();
        var description = gs.getMessage("There should be at least one record in '{0}' matching " +
                          "a query of\n{1}",
                          [step.inputs.table.getDisplayValue(),
                          descriptionGenerator.getConditionDescription(step.inputs.table, step.inputs.field_values)]);
        
        return description;
        })(step);
       

