Hello!
Does exist While...Do loop exist in Appian 16.1? If no, is something that replace that?
I am trying to do multiple save on a CDT but applyComponents seems not very practical.
Any idea how can I improve the applyComponents function or any other idea how to save different value on the same time?
// local!newarray is an array of intinger.
a!save( ri!info[1], rule!SIL_testExpression(1) ), a!save( ri!info[2], rule!SIL_testExpression(2) ), a!save( ri!info[3], rule!SIL_testExpression(3) ) /*a!applyComponents( a!save( ri!info[_], rule!SIL_testExpression(_) ), local!newarray ) */
Discussion posts and replies are publicly visible
You really would be better off using the new a!forEach():
https://docs.appian.com/suite/help/20.1/fnc_looping_a_foreach.html
I know but doesn't exist on old version of Appian. In 16.1
I understand that this is doesn't answer the question you asked, but...Have you discussed a platform upgrade with your stakeholders? 16.1 is 4 years and ~16 releases behind GA.That release should work fine, but practitioners are typically focused on taking advantage of the functionality in the last 2-3 release, at most. You might get an answer, but I suspect many will wonder why you're so far behind.
Since 16.1 there has been a lot improvement to the product; designer features, search, UI enhancements, expression evaluation, loops (as you said), and integrations. Too many to mention.It may be work to coordinate this upgrade. But that won't likely be reduced by waiting longer. The benefits are worth the effort.... and you'll have loops.
a!forEach() is much better and was introduced (iirc) in 17.2 -- if at all possible you should upgrade. I would consider being stuck with 16.1 as essentially torture for a dev at this point; is there a particular reason you still have to use 16.1?
You'll also have the potential for Appian support. Appian no longer even officially supports 18.1.
You'll be able to hire new developers who haven't been working with Appian for many years. There's practically no one left who won't cost a fortune who remembers how to make apply() and applyComponents() work with partial evaluation. I know how because I've been doing Appian for almost 5 years. If you have budget for someone who has been doing Appian for only one year, they won't understand your application.
I don't know if words can fully express the costs of going so long without an upgrade, the benefits of extra features added in that time, and how slight the risks of upgrade are in comparison to the risks of going too long without upgrading.
And in answer to your actual question, I think you have done amazing work with the applyComponents() you wrote. That's about the most efficient, elegant work I've ever seen. If that's not good enough, and you want an improvement over THAT, you're not going to get it without upgrading. Fine craftsmanship, my friend.
Thank you for getting time to explain to the details. And thank you for your honesty. It seems that the upgrade is the only solution.