Making into more rows if any value in the column has two or more values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 09:17 PM
Can anyone explain how to split the row into multiple rows if any column has multiple values.Find the problem in the attachment #Reports #Splittingthemultiplevaluecells
splitting the values in the district column into two rows with remaining same column values and the district vaue should be changed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 12:30 AM
What kind of field is 'District'? Is it a list field, referencing another field, or just a string field?
And what do you mean with 'district value should be changed'?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 01:58 AM
the district field is just a string filed, if it has multiple values i.e values separated by comma then other value should come in next row with the same remaining fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 02:58 AM
Your report will show it like it is in the field and you can't put formatting on it there. You will need to change the formatting of the field itself. You can write a business rule like below, trigger it on 'district contains ', ':
(function executeRule(current, previous /*null when async*/) {
if (current.u_district) {
// Split the string by comma and join with a newline character
var districtArray = current.u_district.split(',');
var formattedDistrict = districtArray.join('\n');
current.u_district = formattedDistrict;
}
})(current, previous);
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark