-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Concat_Distinct with Break Line Delimiter not working #595
Comments
@Silchuki14 use |
Hey @jamessimone,
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 |
* Optimizes an if statement to the outside of a for loop when it isn't necessary to filter children prior to rolling up * Tech debt cleanup - removes blanket Deeply Nested If Statement PMD suppression * Further cleaned up one of the conditionals in RollupCalcItemReplacer by taking advantage of null coalesce * Fixes #595 - thanks to @jongpie for reminding me to update the DLRS migration scripts
@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
![d1621e24-157e-4a2a-ba0a-93b8bd17789f](https://private-user-images.githubusercontent.com/62856327/338276248-d310b743-b393-42e1-8706-7fdc7f313516.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NTM1MDYsIm5iZiI6MTcyMDQ1MzIwNiwicGF0aCI6Ii82Mjg1NjMyNy8zMzgyNzYyNDgtZDMxMGI3NDMtYjM5My00MmUxLTg3MDYtN2ZkYzdmMzEzNTE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA4VDE1NDAwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBiNjAxOGZhNWY1MWIxZTRkNzhkNjYzM2IzNjNlY2M2ZjQ5MjhmMDVmNTAwZTIxYWM1OTJlNmMzMTE5MDY1ZjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Sxcncbvm1Xtz0c7OHXmmjz56W5EdGnuMZAtUMjbsxWg)
Concat_Distinct on DevUps_Models__c field
Concat_Distinct on DevUps_Serial_Numbers__c field.
![979fce0f-7c24-4bdc-853e-c47ad2250334](https://private-user-images.githubusercontent.com/62856327/338276575-38a4513a-b8a7-4973-9bd6-00587abb006b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NTM1MDYsIm5iZiI6MTcyMDQ1MzIwNiwicGF0aCI6Ii82Mjg1NjMyNy8zMzgyNzY1NzUtMzhhNDUxM2EtYjhhNy00OTczLTliZDYtMDA1ODdhYmIwMDZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA4VDE1NDAwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUwMzliZWVkZWNhNGM4ZGUyYmZiYjhlMTA1OTg2YTYwNWExYjY2OTI2NWExNzhkNDVhYTMzYjk1M2M2ZWMwMDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.v_sTQXtCoLPJoHqASjFT-b4H3EbZwVeq-kvA_SEqdBs)
Rollup Controls and Rollup Configs on this “simple” Concat Rollup.
![cd7368cb-252e-41a0-8a60-c1995dd438ac](https://private-user-images.githubusercontent.com/62856327/338276817-717304a0-c857-45f7-97e9-48d92b170ea3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NTM1MDYsIm5iZiI6MTcyMDQ1MzIwNiwicGF0aCI6Ii82Mjg1NjMyNy8zMzgyNzY4MTctNzE3MzA0YTAtYzg1Ny00NWY3LTk3ZTktNDhkOTJiMTcwZWEzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA4VDE1NDAwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM4N2RjNGI5YzEzYWIwNzQ3MGYzMmRhZjhmYTA1ZjU0NTM5OTU5MzFiZDc1MGRiZTVlZDY5MzcwYTYxNzMxNWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.YOjYNEDVe50cEwza02HaGsuxl7dFd8UcvJS65RswOHw)
*Queuable and not Synchronous because the former is understood as the preferred method.
*Rollup Logging enable for the purpose of this exercise.
![2b93a53e-77c8-4526-b640-83f1fe35254f](https://private-user-images.githubusercontent.com/62856327/338276913-62d59e83-0a5d-422d-bb75-5c7906ab94b6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NTM1MDYsIm5iZiI6MTcyMDQ1MzIwNiwicGF0aCI6Ii82Mjg1NjMyNy8zMzgyNzY5MTMtNjJkNTllODMtMGE1ZC00MjJkLWJiNzUtNWM3OTA2YWI5NGI2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA4VDE1NDAwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU2ZjEzMWFjOTI0ZWJlMTlmNDY1ZDMxYzJhZDA0ZjNhZDNhMDE4NWExYTVkNWUwZDQzNzEzYzIwMjM3MDk3ZTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.DSsNFRKFPMOdZpUP295oZA9P5OAk1bVTBnr13Fdu00k)
![f6b0863b-1137-4f9a-81ee-925bccef3de3](https://private-user-images.githubusercontent.com/62856327/338276955-4a8f7e0b-f68e-4993-ae9c-a102486b6ecc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NTM1MDYsIm5iZiI6MTcyMDQ1MzIwNiwicGF0aCI6Ii82Mjg1NjMyNy8zMzgyNzY5NTUtNGE4ZjdlMGItZjY4ZS00OTkzLWFlOWMtYTEwMjQ4NmI2ZWNjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA4VDE1NDAwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI2NjQ5MmQyZGU5OTFjNjQ1ZTViMjJjYTkyNzczNzEwYjdjYjIwNDU0NmY5ODcyOGZmNWJjYWVhODBlNmMxN2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2dLJ3ouFVjf31q9kaKXNB3wzclBEECq1iPPsdB2DhzU)
Concat_Distinct 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
The text was updated successfully, but these errors were encountered: