Related Item: Change Value in Displayform with JS
-
- Posts: 29
- Joined: Fri May 25, 2018
Hi,
i want to change only the displayed Information of Related-Items. I looping the related item and check the Value from columns. If the value (for example) is "fin" i want to changed the display information to "finished". I dont want to update the Column in the list, only the view in displayform.
my Code:
thanks in advanced
kind regards
i want to change only the displayed Information of Related-Items. I looping the related item and check the Value from columns. If the value (for example) is "fin" i want to changed the display information to "finished". I dont want to update the Column in the list, only the view in displayform.
my Code:
Code: Select all
var Row = fd.relatedItems(0).data('ctx').ListData.Row;
$.each(Row, function(i, el) {
if(el.Info == "fin") {
// HERE'S the Code i needed.. this doesnt work.
fd.relatedItems(0).data('ctx').ListData.Row[i].Info = "finished";
}
}
kind regards
Hello slashmaster,
You need to add a CSS class to your Related Items, i.e. "related-issues' and add this code to your JavaScript Editor.
You need to add a CSS class to your Related Items, i.e. "related-issues' and add this code to your JavaScript Editor.
Code: Select all
var row = $(".related-issues").find("[role=row]");
for(var i = 1; i < row.length; i++) {
//3 is the index of the column
var cell = $(row[i]).find("td")[3];
$(cell).html('New text')
}
-
- Information
-
Who is online
Users browsing this forum: Bing [Bot] and 15 guests