cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
apg
Nintex Newbie

Repeating section using JS link

I have created one Nintex form with repeating section. I have used Osama Mourad: Nintex Repeating Section – JSLink to view repeating section data in list view. working fine until here.

My question is can we control the view of columns in list view table which I rendering using JS link. table in list view showing all the columns in repeating section and I don't want that. 

My Repeating section contains calculated field columns too and I don't want to show calculated columns in the table. Is it possible?

I have a person and group field in repeating section and it showing as ID instead of showing display name(see in the below screen print) how to change or make it show display full name?

Thanks in Advance!

0 Kudos
Reply
1 Reply
pfudala
Nintex Newbie

Re: Repeating section using JS link

Hi,

From what Osama produced, you will have to edit the RepeatingSectionTemplate.js file in order to select fields that you want to display/hide in the rendering but where he provides a generic template, you will now have a specific one.

Replace code at Line 23 to 43 by the following code (replace values in hiddenColumnNames by yours).

// loop over the rows
$xml.find("Item").each(function(i){
var $item = $(this);

var hiddenColumnNames = ["Data1","Data2"];
// put header if the first row
if(i==0){
returnHtml += "<tr>";
$item.children().each(function(){
var $column = $(this);
if(hiddenColumnNames.indexOf($column[0].nodeName) > -1){
returnHtml += "<th class='" + $column[0].nodeName + "'>" + $column[0].nodeName.replace(/_x0020_/g, ' ') + "</th>";
}
});
returnHtml += "</tr>";
}

// add rows
returnHtml += "<tr>";
$item.children().each(function(){
var $column = $(this);
if(hiddenColumnNames.indexOf($column[0].nodeName) > -1){
returnHtml += "<td>" + $column.text() + "</td>";
}
});
returnHtml += "</tr>";
});

To show display name in this solution, you will probably have to use some extra API (JSOM, REST web service,...).

0 Kudos
Reply