- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 03:35 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 03:48 AM - edited 06-04-2024 03:50 AM
You really should write better variable names. It's hard to understand your code due to those irritating names.
My proposal:
var arrValues = fd_data._6__for_each.item.u_authority_role.split(',');
var numPosition = arrValues.indexOf(String(fd_data.trigger.current.u_responsibility || ''));
if (numPosition != -1) {
arrValues.splice(numPosition , 1);
}
return arrValues.join(',');
Tip: For removing elements from an array please refer to https://www.geeksforgeeks.org/remove-elements-from-a-javascript-array/#method-3-remove-element-from-...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 03:48 AM - edited 06-04-2024 03:50 AM
You really should write better variable names. It's hard to understand your code due to those irritating names.
My proposal:
var arrValues = fd_data._6__for_each.item.u_authority_role.split(',');
var numPosition = arrValues.indexOf(String(fd_data.trigger.current.u_responsibility || ''));
if (numPosition != -1) {
arrValues.splice(numPosition , 1);
}
return arrValues.join(',');
Tip: For removing elements from an array please refer to https://www.geeksforgeeks.org/remove-elements-from-a-javascript-array/#method-3-remove-element-from-...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 04:05 AM
@Maik Skoddow Sure will consider that will follow proper names