Powerapps – get stuck with UpdateContext

Home / Uncategorized / Powerapps – get stuck with UpdateContext

Question:
I am trying to build a PowerApp to log setup times of our machines by our fitters.

This is what my app looks like:

There are buttons named "Uhrzeit". Pressing these will write the current date and time into the Date/Time fields. I am using the following code:UpdateContext({Total8:(Text( Now(); "[$-de-DE]dd/mm/yyyy hh:mm:ss" ))})

The Date/Time field is named Total8.

The code is working well but after saving the form and opening a new record the old data is still available in the fields. By clicking on the button "Zeiten zur├╝cksetzen" I can "delete" the old data.
UpdateContext({Total8:""})

Problem: When I open one of the older records the old data is not available in the form. There is only the value of the last record. In the Common Data Service where my records are saved the values are correct.

As an example, I am saving this record:

When I open a new record, the values of the record 1 are still available. This should not be the case if my app worked properly.

For your Information: If I enter the date/time without tapping the button, saving the record and opening a new record I don’t have the problem. I think the "UpdateContext" code is not the code I should use here.

Can anyone help me solve the problem?


Answer:

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *