Skip to main content


Power Platform Community / Forums / General / Generative AI Formula ...

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( [""] )


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


    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 272 on at
    Re: Generative AI Formula for Data Sources

    Hi @lgera2187 

    1.  Assign the data source name to the variable 



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




    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

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

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


renatoromao Profile Picture

renatoromao 6,459

Pstork1 Profile Picture

Pstork1 1,962

Expiscornovus Profile Picture

Expiscornovus 1,667