I have been running in circles for several days and I would really feel blessed if someone can correct my logic. I have isolated the problematic portion of my app and I present it here as a .ala and the block of code that is befuddling me.
Although the Get Data block of code may look like dual redundancy, it is only because I have removed specific procedure blocks for simplicity so please do not suggest truncating the Get Data block.
One enters data in the "calculator" by pressing digits and one of the three weather icons below. When all three items have been entered (temperature/humidity/atmospheric pressure) and the Imperial (input) button is pressed, one is sent to the data request page to select a Metric or an Imperial output. Again, this may seem redundant, as both buttons yield the same (and correct) readings in my Basic Outputs page when the Get Data button is pressed.
The problem begins (and my logic evades me) when Metric data is entered into the calculator and the Metric (input) button is pressed. The selected data is garbled. If I enter Imperial data and hit the Metric (input) button, the data comes out correctly. This tells me that my Get Data block is never cascading to the second half where it "expects" Metric data and has the coding to create the proper output. This is at the Else If Metric Data Request line.
My guess is that this is going to be transparently obvious to any Power Users out there. Please show me the error of my ways to allow me to get on with this app creation. Thank you for your patience with this drawn out explanation. You may run the code to see what I am experiencing if the problem is not obvious from the Get Data block.
Sorry, no cigar! The simplification you provided by eliminating half of the Get Data block will not allow my device to work. This is because each of the four conditions below leads to its own procedure which has been eliminated from this file for brevity and simplicity. The idea is to input from the calculator either Imperial or Metric data and then, from the data selection page, to interpret the inputted data as a Metric output or an Imperial output. I need to be able to accommodate the four following logical conditions:
Metric data input from Calculator - Metric data output from the data selection page.
Metric data input from Calculator - Imperial data output from the data selection page.
Imperial data input from Calculator - Imperial data output from the data selection page.
Imperial data input from Calculator - Metric data output from the data selection page.
I appreciate your assistance but, if you look at the following screenshot from your file, you will see that the problem of Metric interpretation remains. The answers are not correct. Again, I feel as though my calculator Metric button does not lead to the Else If Metric conditions logic. It is, instead, interpreted by the Imperial "If" section (check the numbers) of the Get Data block.
I would be happy to work with your truncated file and polish it up to my needs, but we need to get the Metric data properly going in and coming out. If you have a moment, please look over your file and see if you can make it output proper Metric data. Thank you so much!
You may observe that the 25 degrees entered as Metric shows up as Fahrenheit and then the Celsius shows up (-3.8889 degree) as though the 25 degree entry was made with the Fahrenheit button on the calculator.
Use variables, setup all your data in one go (metric and imperial) then just load the variable data to their respective buttons when you select Metric or Imperial. Stop messing about with all these labels and buttons.
Thank you for the solution offered but i found the problem. I had failed to deactivate the Imperial button when choosing Metric, and vice versa. Since the first test was "If Imperial button is enabled," the metric data never had a chance to be processed in the Metric section of the Get_Data block. I added a small block to each button's logic and everything works perfectly without having to start from scratch. Thank's again, here is my solution: