I need to translate this code that I have created in C # so that it can work in my powerapps application. What it does is a while increasing 0.01 to the amount entered
Float pr = quantity;
Decimal See = decimal.Parse (quantity.ToString ());
If (pr % float.Parse (lblCoefArt.Text)! = 0)
While (enter == true)
See = See + 0.01m;
If (See% decimal.Parse (lblCoefArt.Text) == 0)
String fun = "MUST BE:" + See
LblCoefArt.Text = Coefficient of my database
Quantity = Quantity entered by the user
Fun = Shows the quantity that the user has to enter
I'm investigating on this question and will update you once I got any update later.
Currently there is no loop function (like the While, or do until) available in PowerApps.
If you would like PowerApps to add this function, then please consider submit this as an idea in the following forum:
There is if function available under PowerApps, but the logic is the following:
If( Condition, Result [, ElseResult ] )
If( Condition1, Result1 [, Condition2, Result2, ... [ , ElseResult ] ] )
Once the condition is met, it will then show the result, which as a result, only calculate once.
Using the above formula in a button, would only make Variable Test1 + 1 for each time the button is pressed.
Adding the formula reference:
There is a forall function, which would work for each row of the table, check to see if that would help in your scenario:
If you have any further questions, please let me know.
The Timer control can loop operations.
Change the Duration for how often you want the action to occur in milleseconds.
Change the Start and Repeat properties to a condition for when you want the loop active.
Change the OnTimerEnd property to perform the action you want.