web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Bug when using Format ...
Power Apps
Unanswered

Bug when using Format Text on my code?

(0) ShareShare
ReportReport
Posted on by 185

Hi all,

I'm starting a new project and just doing some very basic startup, but already having issues.  I keyed in the following ONE LINE of code and no errors and it works fine:

Set(gOffcUsr, Office365Users.MyProfile().UserPrincipalName)

I click on "Format text" and it REMOVES "Office365Users." from the code.  It changes the above to the below (every character and space has a red squiggly line under it):

Set(
 gOffcUsr,
 MyProfile().UserPrincipalName
)

and then I get a red X on the control that contains the code that says this:

1.jpg

I know I can let it remain unformatted, but our team has decided on always formatting the code for our projects so that everyone's code is formatted the same.  It took me a while to notice that it was removing the "Office365Users." from the code.  Time wasted down the drain.  The last project I worked on with PowerApps a couple of months ago, did not remove the "Office365Users." when I formatted the code.  Fortunately, it was only one line of code.  If I had had a rather large function, who knows how long it would have taken me to notice it removed code.

 

I really, really want to fall in love with PowerApps - but seems like every time I turn around something silly like this happens and it costs me time to figure out why or come up with a workaround.  Is anyone else seeing this?  This ONE line of code is all that I have added - is this going to happen with all of my code?

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @TML,

     

    The symptom confirmed from my side.

    We have reported this issue through our channel, and I will update this thread if there are any responses back from the channel.

    Best regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 387

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 301

Last 30 days Overall leaderboard