Hi All
I have encountered a very strange behaviour where I create an interface in an a!foreach.
When using the two pieces of code it displays the interface for each of the parents but as soon as i edit one it deletes any subsequent parents and removes the interface:
CODE1: With strange behaviour
a!forEach( items: ri!tempBom, expression: a!sectionLayout( contents: rule!PDP_uiRecipeAndPackagingDecisionQuestions( tempBOM: fv!item, newProductRequired: true, packagingTempComponents: ri!packagingTempComponents, blendTempComponents: ri!packagingTempComponents, ), showWhen: local!activeStep = 2 + fv!index ))
If I change the input name on the child to the just 'BOM', and change it at the parent, it all works perfectly
CODE1: With correct behaviour
a!forEach( items: ri!tempBom, expression: a!sectionLayout( contents: rule!PDP_uiRecipeAndPackagingDecisionQuestions( BOM: fv!item, newProductRequired: true, packagingTempComponents: ri!packagingTempComponents, blendTempComponents: ri!packagingTempComponents, ), showWhen: local!activeStep = 2 + fv!index ))
It seems as though somehow APPIAN doesn't like the word temp, can anyone shed some light as to why? This issue is resolved but would just like to learn a bit more.
Discussion posts and replies are publicly visible
I can't replicate this behavior locally with a simple, dynamically nested interface using 'temp' in an of the inputs - all works as expected. I'm wondering if something in your saveIntos within the PDP_uiRecipeAndPackagingDecisionQuestions interface is related to the issue. AFAIK 'temp' is not an Appian keyword, and if it were, inputs with partial keyword usage such as 'labelColorScheme' should not cause any issues (as inputs with exact keywords can create undesired behavior - thanks Stefan for digging that link up).
One note however is your packagingTempComponents and blendTempComponents inputs are the same value of ri!packagingTempComponents - assuming this is not intended and may create unexpected behavior.
A while ago I had some weird behavior which was caused by inconsequent usage of index() and []-based indexing into lists and fields inside multi-level nested UIs while passing down dictionaries with more UI components.
Not sure how complex your UIs are. Can you elaborate?