I'd like to build a progress bar based on how many questions a user has completed thus far in a 40-50 field form. Every field is required. I've set the asterisks of each card to visible=false when a user enters data.
My thought is that I'll base the progress bar on the # of asterisks that are visible. I can't figure out how to accomplish this. I think the solution is something like:
When screen loads:
ClearCollect(colProgress,
{field: name, vis: If( name_star.visible, 0,1)},
{field: date, vis: If( date_star.visible, 0,1)},
{field: size, vis: If( size_star.visible, 0,1)},
{field: pattern, vis: If( pattern_star.visible, 0,1})
)
The Textbox/Shape for the progres bar is:
Sum(colProgress.vis,vis)
This all works great, however:
My problem:
- How do I update the collection when a field is completed by user and the asterisk disappears?
- I don't want to ClearCollect each time a field is completed, this I think will affect performance.
Any ideas?