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 / Output property genera...
Power Apps
Answered

Output property generates Errors when duplicating component

(0) ShareShare
ReportReport
Posted on by 11

When I duplicate my component which has an AutoWidth output property where the right width for the Button is calculated, the new instance of the component has an error. The Errors which are shown are the following:

Unexpected Character. The Formula contains „Error“, but „ParenClose“ is expected.

Unexpected Character. Characters are not used as expected in the formula.

Invalid number of arguments Received: 1, expected 2 or more.

(translated)

 

The AutoWidth formula is the following:

If(
 Self.ShowLabel;
 If(
 Self.IsOutlineVariant Or Self.Disabled;
 2 + DS_Button_Icon.Width + DS_Button_Text.Width + Self.LayoutGap + Self.PaddingLeft + Self.PaddingRight;
 Self.Height;
 DS_Button_Icon.Width + DS_Button_Text.Width + Self.LayoutGap + Self.PaddingLeft + Self.PaddingRight;
 Self.Height
 )
)

This formula works perfect when I insert the component as usual, but as soon as I copy and paste the component, there are the errors listed above.

When the component has set its Width to Self.AutoWidth as initial Value, the component won't show up in the App and has several Errors again, can't be resized and when trying to resize the Button, you can't move anything inside the App and you have to reload the page.


Categories:
  • Verified answer
    leongoett Profile Picture
    11 on at

    I made a small mistake, when changing the output property from `data` to `function` and calling it as a function, everything works when copying! The only problem with this solution is that, when you change the width with your cursor and you set the Width back to Self.AutoWidth() then you have to reload the app to make that function work (for whatever reason)

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard