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 / Custom control templat...
Power Apps
Suggested Answer

Custom control template not found when trying to use Paste Code functionality

(0) ShareShare
ReportReport
Posted on by 4
Greetings,

I am working on powerapps and I have several components I'm importing from a Library which I use on my application. They all work fine, but if I ever attempt to use the Copy and Paste Code functionality with them I get the following error:
"
Details:
Template 'My_Component' for custom control 'Comp_1' could not be found.
Error code: 3501
".
I also tried with a local copy of the same and of other custom components and got the same error, so the problem seems to be with any kind of custom component, whether imported or not.

I apologize if this is already a known issue, I couldn't find anything on the forum or anywhere else to check.
Any help is appreciated,
 
Fred
Categories:
I have the same question (0)
  • Suggested answer
    MichaelFP Profile Picture
    1,892 Moderator on at
    Did you import the component to you  canvas app. You need first to do that to able to copy from one canvas app that already exist to another.



    After select the component. to be included in your canvas app. After do it that yo can try to paste.
     
    If my answer helped you, please give me a thumbs up (👍). If solve your question please mark as answer ✔️. This is help the community.
  • FL-02121714-0 Profile Picture
    4 on at
    MichaelFP, 
     
    The component is in the app, I'm sure, since I use it in multiple places within it. It's only when I try to use the Copy and Paste Code functionality that I get the error I mentioned. And I'm not even copying from one canvas app to another... it's from the same app to itself.
     
    Thanks for the response anyway.
  • FL-02121714-0 Profile Picture
    4 on at
    I did some further testing and the problem seems to be with the components' names.
    • First test: Started I new blank canvas app, created a new custom component, which is named Component1 by default. 
      Inserted an instance of this component into a blank screen. Used the copy code and paste code functionality to duplicate said instance. Worked as expected.
     
    • Second test: Went back into the component editor and renamed Component1 to MyComp.
      Tried to copy and paste code same as before. Failed, with the same error as on my original message.
     
    • Third test: Created a new component, named Component2 by default.
      As on the first test, used the copy and paste code with no problem to duplicate the instanced component. I also pasted the code into a text file. It looked like this:
      - Component2_1:
          Control: Component
          ComponentName: Component2
    Then, as on the second test, I went into the component editor and renamed Component2 to MyComp2.
    Again, trying to copy and paste the code from the instanced components on the canvas resulted on that same error. However when I copied the above code from my notepad and tried to paste it, that worked.
     
    These three tests indicate to me that no matter how much I rename my custom components, even though the code changes to reflect that, somehow in the background, the canvas app keeps referring to them by their original default name.
     
    And that leads to a big problem when importing components from libraries because I have no way of knowing what their original names were, so the copy and paste code functionality is completely unusable.
     
    I'm new to powerapps and this community in general, so I'd appreciate if anyone could tell me how to properly report this bug. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 509 Most Valuable Professional

#2
Haque Profile Picture

Haque 302

#3
11manish Profile Picture

11manish 265

Last 30 days Overall leaderboard