Closed Silchuki14 closed 5 months ago
@Silchuki14 use \n
as the break line character - that would be my guess. BR()
must be some special thing in DLRS, as that's not a valid line break character outside of formulas
Hey @jamessimone,
Did the same test but with /n
and got the same result.
apex-07LAu00000Euwj1MAB.log apex-07LAu00000Ev4OfMAJ.log apex-07LAu00000EvAVdMAN.log
Is this just something Apex Rollup cannot support (ok if that is the case).
@Silchuki14 I've found the issue - which is specific to new line characters - so I should be able to patch today
@Silchuki14 this is fixed in #597. The new package version should be available to install via the README
(First time using Github, hoping this is detailed enough)
Hello James, we are wondering why BR() or
does not work as a delimiter like DLRS. Furthermore, it seems to cause a calculation issue that we wanted to bring up to your attention. Below are our troubleshooting records that hopefully can help answer the question. Debug logs attached as well.
Please let me know if you have any questions, or would need additional details.
Thank you!
ApexRollup V1.6.23
Test Records:
1 Terminal_Upgrade__c Record (Parent)
2+ Device_to_Upgrade__c Records (Child(s))
Device to Upgrade Apex Trigger
*_DLRS Apex Trigger is disabled_**
DLRS Comparables Concat_Distinct on DevUps_Models__c field
Concat_Distinct on DevUps_Serial_Numbers__c field.
Rollup Controls and Rollup Configs on this “simple” Concat Rollup. *Queuable and not Synchronous because the former is understood as the preferred method.
*Rollup Logging enable for the purpose of this exercise.
_ConcatDistinct Issue
With DLRS, we used BR() as a delimiter to break line each value from the Rollup. It worked as expected. With Rollup, the break line delimiter seems to become part of the value, rendering the value distinct. As a result, the value is full of BR() and becomes inaccurate by duplicating values.
*For the purpose of this exercise, the Serial Number Rollup has been updated to no delimiter (comma as default) for comparison purposes.
Before doing triggering any tests, a Full Recalc on both Rollups has been performed. We start with the below field value:
Models: ()DevUp123BR()DevUp098
Serial Numbers: 098765, 123456
Test #1 - Create a new Device to Upgrade from Scratch (not cloned) - Same Values (Fail)
Model Added: DevUp123 - Serial Number Added: 123456
Expectation: Models: ()DevUp123BR()DevUp098 - Serial Numbers : 098765, 123456
Result: Models: ()DevUp098BR()()DevUp123BR()DevUp123 - Serial Numbers: 098765, 123456
Comment: As we can see with the test, if we use BR() (same result with
) as a delimited, the rollup seems to glue it to a value, making it distinct. Without delimiter (default comma), it works fine. We have done this same test, but instead of BR() we used an hyphen ( - ) and it worked as expected. Perhaps the break line specifically is the problem.
We use BR() with DLRS and it works as expected. We need this rollup to break line each value for Email Template purposes (instead of doing it directly in the template with a Substitute formula).
Attached are the Debug Logs I got from the test. Contact_Distinct - Test1CreateNewDeviceSameValue1.log Contact_Distinct - Test1CreateNewDeviceSameValue2.log Contact_Distinct - Test1CreateNewDeviceSameValue3.log