I become accustomed to putting repetitive code in buttons and calling them by the select command. I am now wondering if this is causing me issues and wondered if anyone else has seen the same. For example - I have 2 buttons:
a button called "butCount" to build a collection based on a filter and store the count in a variable called X.
a button called "butSearch" that assigns some variables to values, does a select("butCount") and builds another collection and then calls a navigate command to another screen.
I have very rare/occasional issues where it seems like the "butCount" button hasn't finished building it's collection and storing a count in variable X and it's already nagivating to the next screen. It appears like "butCount" is starting another thread/process and sometimes it finishes before navigating to the next screen and sometimes it doesn't. Has anyone experienced this type of issue? I know the best way around is to embed all the code in "butSearch" but just wondering if someone can shed some light for me on this.