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

InputText Fields randomly missing during Submit

Greetings All,

 

I've got 8 text fields, (5 being populated from Radio Buttons) and 3 being populated from a Context (userDetails: Office365Users.MyProfile() or Office365Users.UserProfile(DataCardValue.Selected.Mail).

 

Randomly, I can submit from the Studio and have the values populate of these 3 Text Fields, however outside of Studio, they refuse to populate on submit.

 

I've checked the Context and ensured the details are correct using labels etc. 

 

I've also completely re-added these fields, in an attempt to fix them.

 

Any thoughts? I'm using Default: userDetails to populate them.

 

Cheers

 

 

7 REPLIES 7
Highlighted
Community Champion
Community Champion

Re: InputText Fields randomly missing during Submit

Hi @aR

This is an issue with the performance of the Office365Users connector: it is slow to fetch data so it will be blank if it does not make it on time.

What I usually do is cache the data I need so that I don't have to call the Office365Users every time.

One idea, for example is to have a text box (MyTextBox) somewhere (even on another screen so not visible to the user) and set its text property to Office365Users.UserProfile(DataCardValue.Selected.Mail)  Then use MyTextBox.Text as the value for your Patch function to submit the values.

If you give some more details, then I can be more specific with advice.

Highlighted
Regular Visitor

Re: InputText Fields randomly missing during Submit

I went one better, onVisible(Screen1) UpdateContext(userDetails: Office365Users.MyProfile()), fires when the screen first comes up, then loads a new form.

 

It should be viable in that the screen loads, the text fields ARE POPULATED but upon submit, don't do anything. The only thing I can think of is that onSubmit the Office365 API gets called again which is what's failing but that would just be... bad design =\

Highlighted
Community Champion
Community Champion

Re: InputText Fields randomly missing during Submit

Hi @aR

 

The API will not get called again.

 

The syntax for the update is missing {}, the correct syntax is:

UpdateContext({userDetails: Office365Users.MyProfile()})

I also suggest checking the content of the userDetails variable with the new capabilities in Studio, to make sure the right data is there and the variable is of record type. (See screenshot below)

 

__.JPG

Highlighted
Regular Visitor

Re: InputText Fields randomly missing during Submit

That's all good, the typo was on the post, not in the code.

 

The data is also definitely there as it populates labels as stated in my original post; 

 

I've checked the Context and ensured the details are correct using labels etc. 

 

Thanks

Highlighted
Regular Visitor

Re: InputText Fields randomly missing during Submit

Any further thoughts?

Highlighted
Community Champion
Community Champion

Re: InputText Fields randomly missing during Submit

Hi @aR

The only high-level thought I have is that there may be an issue with forms.

I do not use forms as I prefer to use the individual control and then Patch the data to the source, which gives me a lot more control and flexibility.

Highlighted
Regular Visitor

Re: InputText Fields randomly missing during Submit

Thanks, I'll give that a try.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,691)