Why I don't get empty string

Alon Grod
Tera Expert

Hi,

Im trying to find a way to work around and create a title to my survey's question. I created a string and then I imported the xml file, edit it and remove the string data type and I suppose to get an empty string, but instead it asks me to put range. Basically, Im trying to set a title using a string field. can anyone tell me what should I do in order to get empty string?

<?xml version="1.0" encoding="UTF-8"?>
<unload unload_date="2022-09-18 09:04:40">
<asmt_metric action="INSERT_OR_UPDATE">
<active>true</active>
<add_info_label>Additional Information</add_info_label>
<allow_add_info>false</allow_add_info>
<allow_not_applicable>false</allow_not_applicable>
<auto_gen>false</auto_gen>
<category display_value="To help us continue to connect, learn, and adjust, please share your thoughts, needs and recommendations.">9674e5801b8e1510aeb37739cd4bcb92</category>
<cond_question>always</cond_question>
<condition/>
<context display_value=""/>
<correct_answer/>
<correct_answer_checkbox>1</correct_answer_checkbox>
<correct_answer_choice/>
<correct_answer_template/>
<correct_answer_yesno>1</correct_answer_yesno>
<custom_metric display_value=""/>
<datatype></datatype>
<default_value_field/>
<depends_on display_value="Division">ad15ad801b8e1510aeb37739cd4bcb3c</depends_on>
<description/>
<details/>
<displayed_when>1645e1c01b8e1510aeb37739cd4bcb53,cc65e1c01b8e1510aeb37739cd4bcb79,e6cca44d1b861910aeb37739cd4bcbec,eecca44d1b861910aeb37739cd4bcbf1,e2cca44d1b861910aeb37739cd4bcbf7,e6cca44d1b861910aeb37739cd4bcbfc</displayed_when>
<displayed_when_checkbox>1</displayed_when_checkbox>
<displayed_when_template/>
<displayed_when_yesno>1</displayed_when_yesno>
<duration/>
<field_validation display_value=""/>
<mandatory>false</mandatory>
<max>10</max>
<max_weight/>
<maximum_normalization_input>false</maximum_normalization_input>
<method>assessment</method>
<metric_type display_value="Employee survey 2022">2c26f87b1b7dd110aeb37739cd4bcbe4</metric_type>
<min>0</min>
<name>(1) Please share your personal opinion regarding the following statements: </name>
<order>1500</order>
<plugin/>
<question>Please share your personal opinion regarding the following statements:</question>
<randomize_answers>false</randomize_answers>
<read_only>false</read_only>
<reference_table/>
<scale>high</scale>
<scored>false</scored>
<script><![CDATA[// The following variables are available:  // - primary: contains the sys_id of the assessable object to be evaluated  // - string_result: the script sets the display string value for this metric to this variable  // - actual_result: the script sets the actual value for this metric to this variable  // - scaled_result: the script sets the scaled value (used in calculations) for this metric to this variable  //  // For example: // var gr = new GlideRecord('cmdb_ci'); // gr.addQuery('manufacturer', primary); // gr.query(); // actual_result = gr.getRowCount(); // string_result = actual_result + ''; // if (actual_result &gt; 100) scaled_result = 5; // else scaled_result = 1;]]></script>
<source_field/>
<string_option>short</string_option>
<sys_class_name>asmt_metric</sys_class_name>
<sys_created_by>along</sys_created_by>
<sys_created_on>2022-09-18 09:03:34</sys_created_on>
<sys_domain>global</sys_domain>
<sys_domain_path>/</sys_domain_path>
<sys_id>637db04d1bc61910aeb37739cd4bcb40</sys_id>
<sys_mod_count>0</sys_mod_count>
<sys_name>(1) Please share your personal opinion regarding the following statements: </sys_name>
<sys_package display_value="Global" source="global">global</sys_package>
<sys_policy/>
<sys_scope display_value="Global">global</sys_scope>
<sys_update_name>asmt_metric_637db04d1bc61910aeb37739cd4bcb40</sys_update_name>
<sys_updated_by>along</sys_updated_by>
<sys_updated_on>2022-09-18 09:03:34</sys_updated_on>
<template display_value=""/>
<u_assignment_group display_value=""/>
<value_parameters/>
<weight>10</weight>
</asmt_metric>
</unload>

1 REPLY 1

Bert_c1
Kilo Patron

I took your xml, removed the one field: '<u_assignment_group display_value=""/>" (as that is not defined in my instance) and imported it into asmt_metric, and 'data_type' showed empty in the list view.  Upon opening that record, the value became 'Attachment'.  This is due to the field's definition as a Choice, and having "Dropdown without -- None -- (must specify a value)". And that the field is configured to Mandatory.  check:

https://[instance]/sys_dictionary_list.do?sysparm_query=GOTOelement%3Ddatatype%5Ename%3Dasmt_metric&sysparm_view=

"Attachment" has sequence number 0 in the Choices list there.