Nintex for SharePoint Forum
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Hi, I have repeating section templates as ListA. ListB is looking up (List Lookup) selection and copying in selected template. Templates in ListA have the degree sysmbol coded as °
(which as typing in template I used Alt 0176 and the degree symbol appears). Whem the selected template is copied into ListB the xml code appears and does not convert it to the degree symbol ( ° ).
How do I reconvert it back to ° ?
done in onPrem 2013 Nintex Forms version 2.11.0.10
Thank you for you help/answer.
what's the use of copied template on listB?
will it be used again for a repeatingsection?
if so, you need not bother with conversion and it should display it correctly
In List B it will be for information.. In List A the degree symbol appears after I enter it as Alt key 0176, which appears correct for the degree symbol. When copied to the repeating section in List B it is displayed as ° as if it translated to its original code.
how exactly do you copy it to listB?
via a LIst Lookup field and javascript.--
function GetRSDataFromLookupSuccess(data) {
//check the result set is not empty
if (data.d.results.length > 0) {
//get the xml data from the result
var rsLookUPdata = data.d.results[0].rsdata2;
//intiate xml parser
parser = new DOMParser();
// populate the parser with the xml data
xmlDoc = parser.parseFromString(rsLookUPdata, 'text/xml');
//get the item tag from the xml
var items = xmlDoc.getElementsByTagName('Item');
//foreach item in the xml
for (var i = 0; i < items.length; i++) {
//get the repeating section last row
NWF$(rslastRowCSS).each(function () {
var $row = NWF$(this);
//set the field value
$row.find('.rs2descriptionCSS input').val(xmlDoc.getElementsByTagName('rs2description')[i].childNodes[0].nodeValue);
$row.find('.rs2typeCSS input').val(xmlDoc.getElementsByTagName('rs2type')[i].childNodes[0].nodeValue);
});
//Add new row dynamically
rsdataObj.find('a').click();
}
List A has 3 fields - Title / description / type
when filling in the field 'type' using the Alt key+0176 results = ° F
after saving converts to this in the 'xml' - <rstype type="System.String">&#176
when copied in to List B appears as #176
via a LIst Lookup field and javascript.--<
I guess this might be your problem.
XML encoded degree sign looks like '&#176'
lookup fields/controls use ';#' pair of characteres as separator between ID and text value.
if you hand over XML encoded data through lookup field/control it may misinterpret/damage your data.
Is there a way to make it work so the degree symbol appears after the copy?
I'm not sure ....
I do not know what you'd like to achieve, what's your setup, what exactly and how you are doing....