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

Community site session details

Session Id : 6lU0Xdt3NwI9mZ5OSWKnEF
Copilot Studio - General
Unanswered

Need Help with PowerFX Formula in Co-Pilot Studio

Like (1) ShareShare
ReportReport
Posted on 28 May 2024 09:13:18 by 10

Hi everyone, I'm new to this whole ecosystem so I'm a bit clueless.

 

I'm currently working on a project in Co-Pilot Studio and have run into an issue with writing a PowerFX formula. Every time I try to run it, I get an error that seems to be related to the inability to add a connector to my Co-Pilot assistant.

 

While I can add connectors to the Microsoft 365 Co-Pilot Assistant without any issues, I'm having trouble adding a connector to my custom Co-Pilot.

 

I started the account about 5 days ago, and I can't work it out. Anyone know why I can't add the connector? 

 

Attached is a screenshot of my copilot studio section where I should be able to add a connector, but it's not there. looking for the bing maps connector. thanks! 

I have the same question (0)
  • Audrie101 Profile Picture
    on 06 Jun 2024 at 18:34:24
    Need Help with PowerFX Formula in Co-Pilot Studio
    It depends on which endpoint you need, but you should be able to search for the appropriate one using the search in adding a new action as shown below. It would be important to create a Bing Maps key before attempting to add the connector: Getting a Bing Maps Key - Bing Maps | Microsoft Learn

    To get assistance on how to use this connector, please visit the API documentation on the developer site for Bing. There is an entry-level learning module here:
    Bing Maps - Connectors | Microsoft Learn 

    FYI: I did a couple of videos years back on using Bing Maps within Power Apps. Of course they are not specific to Copilot Studio chatbots back then, but maybe one of them can help you to understand what you need to be 'thinking about' when using the connector. I was able to create a map in Copilot Studio with my key and the endpoint for creating static maps, so I can confirm it is possible there too.
    Friday Functions Series | Dynamic Maps with the Bing Maps Connector - YouTube
    Deep Dive | Friday Functions Series: Build Maps in the Image Control (youtube.com)

    SCREENSHOT: Here I typed Bing into the Add Action search bar and hit enter. Then I saw several of them below (see the logo and the Bing Maps subtitles):

  • karlvan Profile Picture
    10 on 30 May 2024 at 04:32:56
    Re: Need Help with PowerFX Formula in Co-Pilot Studio

    Also, sorry for the repeated answers, they kept disappearing after I posted. I guess next time I post I'll just assume they were posted.

  • karlvan Profile Picture
    10 on 29 May 2024 at 15:10:11
    Re: Need Help with PowerFX Formula in Co-Pilot Studio

    Thanks for the response! Here’s the error message I’m getting when I attempt to add the Bing Maps connector:

     

    “Identifier not recognized in expression.”

     

    The specific errors are related to the CalculateDistance function in my PowerFX formula. The errors indicate that the identifiers in the formula are not recognized:

     

    CalculateDistance(Topic.DeliveryAddress, '136 Victoria Rd, Marrickville, Sydney') <= 100

    CalculateDistance(Topic.DeliveryAddress, 'Docklands, Melbourne') <= 100

    CalculateDistance(Topic.DeliveryAddress, 'Queen Street Mall, Brisbane') <= 100

     

    I suspect this might be due to not having the Bing Maps connector properly added or configured in my custom Copilot assistant. While I can add connectors to the Microsoft 365 Copilot Assistant without any issues, I’m struggling to do the same for my custom Copilot.

     

    Here’s a screenshot of my Copilot Studio setup for reference: I'm not sure if I'm even barking up the right tree, something else may be the problem, I'm not sure, thanks again!

  • karlvan Profile Picture
    10 on 29 May 2024 at 15:06:19
    Re: Need Help with PowerFX Formula in Co-Pilot Studio

    Thanks for the response! Here’s the error message I’m getting when I attempt to add the Bing Maps connector:

     

    “Identifier not recognized in expression.”

     

    The specific errors are related to the CalculateDistance function in my PowerFX formula. The errors indicate that the identifiers in the formula are not recognized:

     

    CalculateDistance(Topic.DeliveryAddress, '136 Victoria Rd, Marrickville, Sydney') <= 100

    CalculateDistance(Topic.DeliveryAddress, 'Docklands, Melbourne') <= 100

    CalculateDistance(Topic.DeliveryAddress, 'Queen Street Mall, Brisbane') <= 100

     

    I suspect this might be due to not having the Bing Maps connector properly added or configured in my custom Copilot assistant. While I can add connectors to the Microsoft 365 Copilot Assistant without any issues, I’m struggling to do the same for my custom Copilot.

     

    Here’s a screenshot of my Copilot Studio setup for reference: I'm not sure if I'm even barking up the right tree, something else may be the problem, I'm not sure, thanks again!

  • karlvan Profile Picture
    10 on 29 May 2024 at 08:52:04
    Re: Need Help with PowerFX Formula in Co-Pilot Studio

    Hi, Thanks for your response, It seems I am not able to add a connector to a custom copilot. I can add a connector to copilot for microsoft 365, and copilot for sales. 

    But I can't see a way to add the connector for my custom copilot.

     

    However I will answer your question as best I can as I am very clueless, so I'll add as much info as possible in order to locate the problem. 

     

    I'm trying to create a topic where the bot asks the a customers address. I used copilot to build this topic, but it didn't work. here is the formula it gave me - 

    CalculateDistance(Topic.DeliveryAddress, 'Docklands, Melbourne') > 100 && CalculateDistance(Topic.DeliveryAddress, 'Queen Street Mall, Brisbane') > 100
     
    and here is the error attached. also attached is the flow before this. I may be doing this all wrong! All of my other topics seemed to work great and they were fairly complex. It seems asking for a distance is a bit more complex. Any ideas would be great, thanks!
  • Audrie101 Profile Picture
    on 28 May 2024 at 21:07:20
    Re: Need Help with PowerFX Formula in Co-Pilot Studio

    Happy to help. What is the error message you are getting when you attempt to add the Bing Maps connector?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 416 Super User 2025 Season 2

#2
trice602 Profile Picture

trice602 141 Super User 2025 Season 2

#3
Jerry-IN Profile Picture

Jerry-IN 68

Last 30 days Overall leaderboard
Loading complete