Question
Evgeny Shvarov · Apr 5, 2016

How to avoid writing duplicate code in dtl InterSystems Ensemble

Hi! 

There is a question for Ensemble on Stackoverflow:

I have the below dtl. In the foreach loop, I am just copying the same code in another part under anif condition. How can I avoid this redundancy? Can I reuse using sub transformation?

Here is the dtl class file :https://docs.google.com/document/d/1snJXElyw13hAfb8Lmg5IaySc7md_DE8J40FB79hBaXU/edit?usp=sharing

Original question.

1
0 452
Discussion (2)0
Log in or sign up to continue

Maybe I'm missing something, but it seems like you could have an OR condition to eliminate the code duplication 

if condition='ExcludeInactiveAllergiesAlerts="No" OR flag'="No"