Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

How to copy text into Power BI embedded QnA field from another text box?

I am using Power BI embedded QnA feature in my application, this feature is awesome but it cannot answer questions asked in completely natural language by the user as every user is not familiar with the data model. I am trying to intercept this feature with a chatbot where the string of text first goes into the chatbot and then it is manipulated in a way which is understood by Power BI and then pasted into the Power BI QnA box to return the answers to user's questions. Is there a way to copy text from one text box to QnA box in Power BI embedded. I am trying to do it using javascript code, using the 'div' id of the QnA box but it isn't working. Has anyone tried it or knows if it is possible?

 

Below is the code that I'm using, where the text box that I have created has id 'source' and QnA box of Power BI embedded has id 'utteranceContent'

 

<input id="source" type="text" oninput="copyData('source', 'utteranceContent')" /> <hr style="clear:both;">

 

<script type="text/javascript">
function copyData(sourceId, targetId) {
var data = document.getElementById(sourceId).value;
document.getElementById(targetId).innerHTML = data;
}
</script>

0 REPLIES 0

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.