Skip to main content

Notifications

Copilot Studio - General
Answered

Generative AI Formula for Data Sources

Posted on by 11

In a "create generative answers" node, I saw that in the classic data sources there is the option of manually inputting links to Sharepoint or public websites, and there is also the option to use a Power Fx formula. I have been trying to use a Power Fx formula so that I can use a variable to detemine where the data source is pointing, but so far I have not been able to find a formula that works. The formula I was trying is

 

Table( ["www.myUrl.com"] )

 

and other things similar. If anyone knows how to do this properly, or even just how to use a variable for my data source, it would be greatly appreciated.

  • Verified answer
    lgera2187 Profile Picture
    lgera2187 11 on at
    Re: Generative AI Formula for Data Sources

    I've solved it. The issue was the link I was using and not the formula. I was pointing to a Sharepoint site page (aspx) and not the actual sharepoint. The formula I'm using now is

    ["sharepointwebsite.com/directory/"]

    and it seems to work just fine. I imagine adding more sites to the table will work too.

  • lgera2187 Profile Picture
    lgera2187 11 on at
    Re: Generative AI Formula for Data Sources

    The issue is it expects the data source to be in a Table format. If you use a string it gives and Invalid Type error

  • Umianta Profile Picture
    Umianta 293 on at
    Re: Generative AI Formula for Data Sources

    Hi @lgera2187 

    1.  Assign the data source name to the variable 

    Umianta_1-1716599785329.png

     

    2. then assign that variable to the Generative answer in Fx formula

     

    Umianta_0-1716599758271.png

     

    If this was helpful:
    Please mark it as a solution
    Give me a thumbs-up
    Connect on LinkedIn
    I consistently upload technical videos. If you're interested, please visit and subscribe to my YouTube Channel
    Always glad to help, Umesh Khandelwal!

     

     

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Getting Started…

Welcome to the Power Platform Community! We appreciate your visit…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 138,287

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,172

Leaderboard