I have a situation where my app works perfectly when I run it in the design studio however, when I run the published app, it gives an odd behaviour where the radio buttons keep the previously displayed value despite resetting them.
On a specific screen, I use radio buttons where users can provide a response to a question. The options presented vary based on the question number. Basically, if the question is C5 or I2, it presents: Yes, No and N/A. For all other questions, it only presents: Yes or N/A.
In the Items section, I have the code below.
If(ThisItem.Question.Value = "C5 - Engineering" || ThisItem.Question.Value = "I2 - Engineering", ["Yes","No","N/A"],["Yes","N/A"])
For OnSelect I have
UpdateContext({varRadioAnswerChoice: Radio2.Selected.Value});
UpdateContext({ConfirmationPopup: true})
For OnChange I have
UpdateContext({varRadioAnswerChoice:Radio2.Selected.Value})
Now, If the question has already been answered (the items Status is set to 'completed'), I pull the Answer value from SharePoint and display that, otherwise the Radio buttons should not have anything selected. To do this, in Default, I have
If(
ThisItem.Status.Value = "Completed",
ThisItem.Answer.Value,
Blank()
)
If I open an item where the status is 'completed', the answer in SharePoint is displayed correctly, the form is 'read only' and the save button is disabled, so users can only select the 'back' button. The OnSelect value of the back button is
//Clear the Radio button variable
UpdateContext({varRadioAnswerChoice: Blank()});
//Clear the Radio buttons
Set(
IsReset,
true
);
Set(
IsReset,
false
)
This should clear the radio buttons so that when the user selects another item, it uses the 'Default' option below to either show the selected items saved value if complete or blank if not complete.
If(
ThisItem.Status.Value = "Completed",
ThisItem.Answer.Value,
Blank()
)
In the Dev Studio, when I test this with the following steps, it works perfectly every time:
- Open a completed item, it shows the selected item's value
- Click the back button
- Select a question that is NOT completed, the radio buttons are blank as expected.
However, after publishing it, when I follow the above steps in the published app, for step 3, it displays the radio button option from the previously completed question rather than no values.
Shows this:
Should be showing this:

If I then click on the back button again, If I watch closely, I can see the radio button clear and then if I then go in to a question that is not completed, it works correctly.
I thought there might be a delay in the changes being published but I left it over the weekend and it is still gives this behaviour in the published app. I've tried different browsers and colleagues see the same behaviour.
What am I missing here?
Thanks
Paolo