cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marcela_rojas98
Regular Visitor

Timer

Hi All!

 

I used a timer on an app, but currently, I have problems with it. We develop an app where you can reserve a product and the inventory updates once you confirm your purchase intent (we use a template of power apps ->Asset Checkout). The home screen works well (the inventory update immediately), but if you are in a confirm screen (of the product that you select on the home page), the inventory doesn't update ... it only updates when you refresh the app. 

An example: Two people (in their computers) are interested in a specific product, if one of them reserves that product, the other person can't view the real inventory in the Confirm screen because the number doesn't update.

Home screen-> Ok, the box text updates correctly (Agotado, for example)

Home screenHome screen

Confirm screen: The box text "5 unidades disponibles" doesn't update

Confirm ScreenConfirm Screen

 

3 REPLIES 3
Alex_10
Super User
Super User

@marcela_rojas98 

 

on your Confirm screen there is Timer2.

Is that timer should refresh info when a user opens Confirmation screen?

If yes, try:

 

CheckoutScreen.OnVisible = 

UpdateContext({startTimer2: false}); UpdateContext({startTimer2: true}); 

 

Timer2.Start = startTimer2

 

 

 

 

Hi @Alex_10! Thanks for your answer!

We found that the problem is related to the variable's type. The home screen has a global variable (ThisItem) but when you select a product, that creates a local variable (ItemSelected) so the box text of the Confirm screen doesn't update (it only occurs when you refresh the app or when you click to the previous screen and entry again). We think that this is the reason for the problem.

Let me know if you understand.

 

Alex_10
Super User
Super User

@marcela_rojas98 

let say the text input that shows "5 unidades disponibles" has name TextInput.

Is this TextInput located inside CheckedoutForm?

What code is in:

 - TextInput.Default

- CheckedoutForm.Item

- CheckedoutForm.DataSource

?

 

 

 

 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,371)