Below is the code being used as part of a wizard which has foreach inside expression of a foreach to set columns size. When this page is added as a startform to be able to show on a Site, the Process model is throwing below error. It could be because it is not able to identify difference between fv!item in both the foreach loops. How to fix this error or add the page to site?
This process model could not be published due to the following errors. Please correct them before continuing.
Code
a!columnsLayout( columns: a!forEach( items: enumerate( if( mod( length( local!data ), local!maxItemsPerColumn ) = 0, length( local!data ) / local!maxItemsPerColumn, floor( length( local!data ) / local!maxItemsPerColumn ) + 1 ) ) + 1, expression: with( local!indices: enumerate( if( ( fv!item * local!maxItemsPerColumn ) > length( local!data ), length( local!data ) - ( ( fv!item - 1 ) * local!maxItemsPerColumn ), local!maxItemsPerColumn ) ) + ( if( fv!isFirst, 0, ( fv!item - 1 ) * local!maxItemsPerColumn ) + 1 ), a!columnLayout( width: "AUTO", contents: { a!forEach( items: local!indices, expression: a!checkboxField( labelPosition: "COLLAPSED", choicelabels: local!data[fv!item].text, choiceValues: { true }, value: if( local!data[fv!item].boolean, local!data[fv!item].boolean, null ), saveInto: { a!save( target: local!data[fv!item].boolean, value: not( local!data[fv!item].boolean ) ) } ) ) } ) ) ), showWhen: or(local!currentStep = 1) ),
Discussion posts and replies are publicly visible
There are no process variables nor rule inputs from start from saved as process variables. Used Process model just to insert page into Site. Process model does not have any logic. Except configuring the start form.
Is there a way to insert page into site without process model?
Still same issue. Tried to create new process model and set the interface for start form. got the error. Could be something to do with interface itself. Could be issue with respect to having foreach loop inside expression of a foreach with fv!item same in both loops without index set for each loops separately. But not sure how to fix it.
Issue fixed, there was an index in a expression rule outside this process and UI. Thank You Bhanu.