Value Put to Different Variable Depending on Value of Another Variable

How do you do this in Lectora?


If I have a variable called timeSpent that I'd like to add it to different variable depending on the value of currentPage


so if currentPage = 1 then put timeSpent to page1Time, if currentPage = 2 then put timeSpent to page2Time, etc... This way, I don't have to create multiple buttons for each page.


Is it possible to do that? Or maybe a different approach is needed?


Thanks,

Discussions have been disabled for this post