
Hi,
I have a caluclator page that switches between imperial and metric units based on a dropdown selection at the top of the page. When the units are switched I have the inputs automatically convert to between metric and imperial through the use of an updatecontext function that references it's own text input. It works in the desktop app but doesnt work on mobile (the numbers don't convert and the output wont calculate. Here is the code I use for the OnChange for the drop down menu at the top:
If(Units.Selected.Value="Imperial",UpdateContext({FluidDensityInput:FluidDensityInput*0.0083454}) And UpdateContext({JetNozzleInput:JetNozzleInput*0.393701}) And UpdateContext({PressureDifferentialInput: PressureDifferentialInput*0.00689476}),UpdateContext({FluidDensityInput:FluidDensityInput*119.826}) And UpdateContext({JetNozzleInput:JetNozzleInput*2.54}) And UpdateContext({PressureDifferentialInput: PressureDifferentialInput*145.038}))
The calculation for the final output is as follows:
If(Units.Selected.Value="Metric",Round(60*DischargeCoefficientInput*(JetNozzleInput/100)^2*NumberofNozzles*Pi()
/4*Sqrt((2*PressureDifferentialInput*10^6)/(FluidDensityInput*(1-(4*JetNozzleInput/3.81)^4))),3),Round(60*DischargeCoefficientInput*(JetNozzleInput)^2*NumberofNozzles*Pi()/4*Sqrt((2*PressureDifferentialInput)/(FluidDensityInput*231*(1-(4*JetNozzleInput/1.5)^4))),3))