6 Replies Latest reply: Jan 31, 2017 5:24 PM by Marco Wedel RSS

    How to limit length of variable?

      Hi everyone!


      I'm developing an analysis tool for one of our customers in QV.. one feature of this app is the possibility to log the selections made by the user. This is realized through a variable which is refreshed with every action: its content gets thereby expanded with a timestamp (now()) and the current selection status (GetCurrentSelections()) in a new row (chr(13)). The content of the variable is displayed in a text box on a separate sheet. Thus, the user can explore the data and afterwards reproduce its actions through the log. Although this is already working very well, I would like to limit the variable to something like 300 rows (=300 last actions) because of performance aspects. I already added the possibility to clear the log-variable through a button manually. However, since the user might forget to push this button every now and then, an automatic solution seems reasonable..


      I'm wondering if there is a possibility to limit the length of a variable row-wise? Only hint I found so far was using "autocommenting expression" but neither I wasn't sure if this really addresses my issue nor wasn't I able to implement it. Do you have any ideas how to solve this task?


      Thank you!