cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aR
Level: Powered On

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
Meneghino
Level 10

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.

aR
Level: Powered On

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 =\

Meneghino
Level 10

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

aR
Level: Powered On

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

aR
Level: Powered On

Re: InputText Fields randomly missing during Submit

Any further thoughts?

Meneghino
Level 10

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.

aR
Level: Powered On

Re: InputText Fields randomly missing during Submit

Thanks, I'll give that a try.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 205 members 5,232 guests
Please welcome our newest community members: