Using an action button to verify a table

Hi All,

I am attempting to code in an action button to act as a submit button, on slide 2 of the activity below

Any pointers?

Thanks!
C

You can add the action button, label it as “Submit”, call it whatever (but1 in my case) and then just add the condition when but1.timeSincePress=0 "" at the start of your cellContent conditions. For example, the first line would become

cellContent(2,6): when but1.timeSincePress=0 "" when table1.cellNumericValue(2,2)=-2 and table1.cellNumericValue(2,3)=0 and table1.cellNumericValue(2,4)=-2 and table1.cellNumericValue(2,5)=0 "✅" otherwise "❌"

That way, the correct column stays blank until the Submit button is pressed. Using timeSincePress rather than pressCount also has the advantage that it will reset if you click into the table.

Is that what you were looking for?

2 Likes