cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Re: Issue with controls reset

Well, I actually got it to work following the powerapp team's guidance.

The bad part is now 2 of the 4 answers are not sending to the database. I've combed over the differences between everything and haven't found the issue. If I were you, I'd check the powerapp recommendation again and follow it closely, it works. 

Anonymous
Not applicable

Re: Issue with controls reset

The guidance from PowerApp staff does do the right job, but does not seem to factor in what it does to the resulting data gathered in a table linked to the survey. 

 

When the OnVisible code for sheet/question 2 is set to:

If(fromQuestion_1,Collect(signal,{val:0});Clear(signal)

 

and the OnSelect button for sheet/question 1 is set to:

Navigate(Question_2,Fade,{fromQuestion_1:true})

 

and the Radio Reset fuction for sheet/question 2 is set to:

IsEmpty(signal)

 

The result is that when moving from question 1 to question 2, the Radio 2 is in fact blank. 

The issue is that Radio 2 data is not then captured in the data gathering table in the cloud/sharepoint - rendering the survey useless. 

 

When IsEmpty(signal) is removed and set back to "false" and the survey run again, the data populates, but the Radios reappear. It must have something to do with the IsEmpty(signal) portion. 

 

 

 

hpkeong Community Champion
Community Champion

Re: Issue with controls reset

Hi

 

Please have this code place in the

TargetScreen.OnVisible: UpdateContext({VarRadio:false, VarTog: false}); UpdateContext({VarRadio: true, VarTog: true})\

 

Where:

TargetScreen.Radio.Reset = VarRadio

TargetScreen.Toggle.Reset = VarTog

 

I have tested to be definitely OK and hope it meets your need.

 

NB:

 

In fact, I have tested button1.pressed for toggle and radio and they works on PowerApps Studio.

So, if this is going to give you trouble when running the apps, the above fix hope works for you and it maybe due to support of mobile / different platform.

hpkeong
Anonymous
Not applicable

Re: Issue with controls reset

@hpkeong Yes. You are the man. This is the best solution so far. 

I'm happy with this. 

The only thing that could be better is if there wasn't a lag time from the time the page loads to when the radio actually dissappears. My final page is a thank you page with a button that navigates back to the home page. When using this button to navigate back to the home page and then to all subsequent quetions again, the radios hang on the screen for about .25 of a second before going away.

In a survey, this could influence the user's decision and is a no go. 

 

When programming the final thank you button to "Exit()" the survey closes and the user would have to reopen the survey to have someone else take it. in this scenariou the radios are all reset and don't hang on the screen.

If this lag time can't be fixed, I'd recommend users set the final page to Exit() and just reopen the survey from the powerapps menu. 

 

jyotipch
Frequent Visitor

Re: Issue with controls reset

Hello @erga,

 

I am having trouble in resetting my combo boxes. Works fine in editor but doesnt work on the published version. I tried implementing the solution suggested by you, but still the combo boxes do not reset.

 

I am having a display gallery and some combo boxes. I select some values in the combo boxes after which I click a button which is doing the Collect(Signal, 0); Clear(Signal). And the reset property of the combo boxes set to IsEmpty(Signal).

 

Can You please advise?

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (9,537)