Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

PCF jquery & bootstrap: "error occured during initialization of control: AB.FirstPCF;Message: control.popover is not a function"

(0) ShareShare
ReportReport
Posted on by 98

I am trying to create a PCF control with popover for a text field.

I have installed jquery, bootstrap, types/jquery, types/bootstrap.

In index.ts file I import jquery and bootstrap:

import * as $ from "jquery";
import * as Bootstrap from "bootstrap";

This is the code I use:

this.setPopover = (function () {
			var control = $(this.inputControl);
			if (typeof (control) == 'undefined') {
				setTimeout(this.setPopover, 500);
			}
			else {
				control.popover(
					{
						content: (context.parameters.sampleProperty.attributes && context.parameters.sampleProperty.attributes.Description) || "Description is not available",
						placement: "right",
						trigger: "hover"
					});
			}
		});
		this.setPopover();

 and receive an error "error occured during initialization of control: AB.FirstPCF;Message: control.popover is not a function".

Any suggestion here?

 

  • eliz_talent Profile Picture
    98 on at
    Re: PCF jquery & bootstrap: "error occured during initialization of control: AB.FirstPCF;Message: control.popover is not a function"

    Thank you, Diana for responding.

    Unfortunately, I didn't manage to fix the issue. From other experience with PCF, it looks like the harness does not work properly with a lot of things in custom controls.  

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: PCF jquery & bootstrap: "error occured during initialization of control: AB.FirstPCF;Message: control.popover is not a function"

    Hi @eliz_talent , 

    I think the problem is calling the setPopover directly after definition.
    The definition of your controls should be inside the init method of your PCF.

    Hope this helps!

    Kind regards,

    Diana

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 87 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

Overall leaderboard