Skip to main content

Notifications

Power Apps - Power Apps Experimental Features
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
  • FL-02121714-0 Profile Picture
    FL-02121714-0 4 on at
    Custom control template not found when trying to use Paste Code functionality
    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. 
  • FL-02121714-0 Profile Picture
    FL-02121714-0 4 on at
    Custom control template not found when trying to use Paste Code functionality
    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.
  • Suggested answer
    MichaelFP Profile Picture
    MichaelFP 1,526 on at
    Custom control template not found when trying to use Paste Code functionality
    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.

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

Kickstarter Events…

Register for Microsoft Kickstarter Events…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #13 Writing Effective Answers…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,858

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,505

Leaderboard

Featured topics