as discussed after the meeting yesterday this was not the most practical way so updated as we discussed to not change the main dialogs and adjsut the stack dialogs
Bad practice to have two calls to same function here. Possible that 2nd call will return different result. Should call function once to assign value to a local var prior to if statement and then reference the local var in the if statement.