<h2>Add a column to a table</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2025" /><meta name="DC.rights.owner" content="(C) Copyright 2025" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="task" /><meta name="DC.title" content="Add a column to a table" /><meta name="abstract" content="As part of creating or modifying a discovery pattern, you can use the Transform table operation to add one or more computed columns to an existing table and place the results in a target table. The target table can be the source table." /><meta name="description" content="As part of creating or modifying a discovery pattern, you can use the Transform table operation to add one or more computed columns to an existing table and place the results in a target table. The target table can be the source table." /><meta name="DC.subject" content="Transform table operation, Patten Designer, add column to table, Pattern Designer, transform table" /><meta name="keywords" content="Transform table operation, Patten Designer, add column to table, Pattern Designer, transform table" /><meta name="DC.relation" scheme="URI" content="../../../product/service-mapping/task/t_CreatePatternPatDef.html" /><meta name="DC.relation" scheme="URI" content="../../../product/it-operations-management/reference/r_ITOMApplications.html" /><meta name="DC.relation" scheme="URI" content="../../../product/it-operations-management/reference/itom-visibility-landing-page.html" /><meta name="DC.relation" scheme="URI" content="../../../product/service-mapping/concept/c_MappingPatternsCustomization.html" /><meta name="DC.relation" scheme="URI" content="t_UnionTablePatDef.html" /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2023-08-03" /><meta name="DC.date.modified" content="2023-08-03" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="t_TransformTablePatDef" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>Add a column to a table</title></head><body id="t_TransformTablePatDef"> <div class="breadcrumb"><a class="link" href="../../../product/it-operations-management/reference/r_ITOMApplications.html" title="Get better visibility into your infrastructure and services, prevent service outages, and expand your organization's operational agility with ServiceNow IT Operations Management.">IT Operations Management</a> > <a class="link" href="../../../product/it-operations-management/reference/itom-visibility-landing-page.html" title="The ServiceNow ITOM Visibility product consists of ServiceNow Discovery, ServiceNow Service Mapping, Certificate Inventory and Management, Service Graph Connectors, CMDB 360, and Firewall Audits and Reporting. Discovery and Service Mapping give you a unified, connected view of your entire IT network and the services that it supports.">ITOM Visibility</a> > <a class="link" href="../../../product/service-mapping/concept/c_MappingPatternsCustomization.html" title="Service Mapping and Discovery use patterns in their discovery process that cover most industry standard network devices and applications. You can customize these patterns and create new ones.">Discovery patterns used by ITOM Visibility</a> > </div> <h1 class="title topictitle1" id="ariaid-title1">Add a column to a table</h1> <div class="body taskbody"><p class="shortdesc"><span class="ph">As part of creating or modifying a discovery pattern,</span> you can use the <span class="ph uicontrol">Transform table</span> operation to add one or more computed columns to an existing table and place the results in a target table. The target table can be the source table.</p> <div class="section prereq p"> <p class="p">Role required: pd_admin</p> <p class="p">Navigate to the relevant pattern step:</p> <ol class="ol" id="t_TransformTablePatDef__ol_zzm_qcv_fy"><li class="li" id="t_TransformTablePatDef__id_NavigateRelevantSectionPatDef">On the pattern form, select the relevant identification section for <span class="ph">Discovery</span>.<p class="p">Alternatively, select the relevant identification or connection section for <span class="ph">Service Mapping</span>.</p> </li><li class="li">Select the relevant pattern step or click <img class="image" id="t_TransformTablePatDef__image_ury_rr5_fy" src="../../it-operations-management/reuse/../../service-mapping/image/PatDefAddStepAbove.png" alt="Add a step button" /> to add a step.</li></ol> <p class="p">Basic knowledge of programming is desirable.</p> </div> <ol class="ol steps" id="t_TransformTablePatDef__steps_xrk_23y_kt"><li class="li step stepexpand"> <span class="ph cmd">Select <span class="ph uicontrol">Transform table</span> from the <span class="ph uicontrol">Operation</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Fill in the fields, as appropriate.</span> <div class="itemgroup info"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="t_TransformTablePatDef__table_hdd_gdy_kt" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d839113e125">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d839113e128">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e125 ">Source table</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e128 ">Specify the name of the source table.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e125 ">Target table</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e128 ">Specify the name of the target table. The target table can be the same as the source table.</td></tr></tbody></table> </div> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Click the plus icon to add each target field and fill in the fields, as appropriate.</span> <div class="itemgroup info"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="t_TransformTablePatDef__table_prp_s43_pt" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d839113e177">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d839113e180">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e177 ">Target Field Name</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e180 ">Specify a name for the column. It can be an existing column or a new one.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e177 ">Value</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e180 ">Specify the operation expression that determines the values added to the column. You can use variables including values from tabular variables as described in <a class="xref" href="../reference/r_UsefulShortcutsPatDef.html" title="There are several ways to enter values in Pattern Designer. You can use the following types of values in patterns: strings, variables, concatenated variables, and eval() functions. Do not use GlideRecords in patterns.">Enter values and variables in patterns</a>.</td></tr></tbody></table> </div> </div> </li><li class="li step stepexpand"> <span class="ph cmd">If in Debug mode, test the step by clicking <span class="ph uicontrol">Test</span> and checking that the operation brings the result you expected.</span> </li></ol> <div class="example"> <p class="p">The Transform Table operation is used to identify the Integration Feature Pack.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="t_TransformTablePatDef__table_tmp_bhk_5bc" class="table" frame="border" border="1" rules="all"><colgroup><col style="width:50%" /><col style="width:50%" /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d839113e244">This operation is used in</th><th class="entry cellrowborder" style="vertical-align:top;" id="d839113e247">This item</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e244 ">Hierarchy</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e247 ">Applications > Web Servers</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e244 ">CI Type</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e247 ">Load Balancer Service [cmdb_ci_lb_service]</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e244 ">Pattern</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e247 ">F5 BigIP LTM</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e244 ">Section</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e247 ">Identification for all entry point types</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e244 ">Step number and Name</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d839113e247 ">9. Fix ip</td></tr></tbody></table> </div> <p class="p">For F5 load balancer, you want to translate IP addresses in the default hexadecimal format into decimal format. You use the Javascript that performs this translation in the value field. You add the "clean_ip" column containing IP addresses in decimal format to the existing (source) table.</p> <div class="fig fignone" id="t_TransformTablePatDef__fig_nnl_5bm_qy"><span class="figcap"><span class="fig--title-label">Figure 1. </span>Transform Table operation values</span> <br /><img class="image" id="t_TransformTablePatDef__image_w2z_vbm_qy" src="../image/PatDefTransformTblExample.png" alt="Transform Table usage" /><br /> </div> </div> <div class="section postreq" id="t_TransformTablePatDef__postreq_eft_5pw_yz"><ul class="ul" id="t_TransformTablePatDef__ul_ld4_wjw_yz"><li class="li">Continue editing the pattern by <a class="xref" href="t_DefineDiscoveryStepsPatDef.html" title="For each Identification Section and Connection Section entry that you added to the discovery pattern, define discovery steps. These steps are the basis for discovery.">adding a new step and defining its operation</a> or</li><li class="li"><a class="xref" href="t_FinalizePatternPatDef.html" title="After you finish defining your pattern, make it ready for use by Service Mapping and Discovery.">Finalize the pattern</a>.</li></ul> <div class="sectiondiv">cmdb-key-value</div><span class="ph" id="t_TransformTablePatDef__discovery-cloud-tag"><span class="ph">Discovery</span> also collects cloud tags that are specific to each virtual machine (VM) and saves them to the Key Value [cmdb_key_value] table.</span></div> </div> <div class="related-links"> <div class="familylinks"> <div class="parentlink"><strong>Parent Topic:</strong> <a class="link" href="../../../product/service-mapping/task/t_CreatePatternPatDef.html" title="Create or modify a discovery pattern and define its basic attributes.">Create or customize patterns</a></div> </div> <div class="linklist relinfo reltasks"><strong>Related tasks</strong><br /> <ul class="linklist"><li class="linklist"><a class="link" href="t_UnionTablePatDef.html" title="As part of creating or modifying a discovery pattern, you can use the Union table operation to append two tables of the same format.">Append two tables</a></li></ul></div> </div> </body></html></div>