OK, I'll answer my own post. Unless you have a better suggestion, it seems the only way is to have an array of IF statements comparing the defaultPeriod with each Period time that is available (5min, 10min, 15min, etc) and then ASSIGN the correct Period to a new Period variable, as shown here:
