I have an app with a gallery. The gallery contains stock items and the number of them in stock. Within the gallery I added a text input box (format numeric) called QtyRqd for the user to enter how many of the item they want. Onselect of the Next Arrow within the gallery does (amongst other things), patch the 'quantity' field of the data source with ThisItem.quantity - value(QtyRqd.text) also set(var_order_qty, value(QtyRqd.text) and then navigate to the next screen. I use the variable var_order_qty on the next screen.
This all works perfectly when I run the app within PowerApps studio, but when I publish the app and run it outside of the studio, the value of the quantity_selected variable isn't set by the Onselect of the Next Arrow (the value is zero on the next screen). I know textinput.text is OK because the Patch function I mentioned earlier works to reduce the number in stock by the input value when the onselect happens. Also in my code below, all the other variables I set work OK on the next screen, it's only the Text Input box that fails. I also tried displaying QtyRqd.Text on the next screen instead of the variable but it's empty too.
It's incredibly hard to troubelshoot this because it works perfectly in Studio.
Anyone have an idea what could be happening?
Here is my Onselect of the Next Arrow in the gallery.
Set(
var_remaining,
Value(ThisItem.Quantity-QtyRqd.Text)
);
Patch(
'Internal Stock Cupboard',
LookUp(
'Internal Stock Cupboard',
ID = ThisItem.ID
),
{Quantity: Value(ThisItem.Quantity-QtyRqd.Text)}
);
Set(
var_order_title,
ThisItem.Title
);
Set(
var_order_qty,
Value(QtyRqd.Text)
);
Set(
var_vpn,
ThisItem.VPN
);
Set(
var_item_cost,
ThisItem.Cost
);
Navigate(
Success,
ScreenTransition.Fade
)


Report
All responses (
Answers (