Hi KrishnaV,

In the third example, you could use "Mod(varItrCount,2)=1" as the Default of the tglLoop. (Odd is true and Even is false) Then you don't have to use the separate Variable "varLoop" anymore.

And in the OnChange you don't have to Select the Button, you can handle everything inside the OnChange.

 

If(
 varItrCount > 0 && varItrCount <= Value(txtItrCnt.Text),
 // Collect and increment Counter
 Collect(
 collTable,
 {tblRowVal: txtTblNum.Text & " X " & varItrCount & " = " & varItrCount * Value(txtTblNum.Text)}
 );
 UpdateContext({varItrCount: varItrCount + 1}),
 // Else : Reset Counter
 UpdateContext({varItrCount: 0})
)

 

The code in the Button could then just be

Clear(collTable);
UpdateContext({varItrCount:1})

 

Regards,

Gabrz