Table template Web SDK not working

(Siva L) #1

Hi @Subrahmanyam could you please solve the issue table template is not working in browser after published the bot but its worked in development.

(Subrahmanyam Donepudi) #2

@rajinisiva93 Could you please provide the details on what issue you observe while accessing the template? Was the report link not generated or the template not rendered while accessing the link?

(Siva L) #3

i have share screenshot kindly check.

In the screen i have run bot in botbuilder i can able to see response as table.

In the screen i have run bot in my website using webSDK i can’t able to see response as table.

Here is my table template
var elements = context.GetAllLeaveBalanceService.response.body.ArrayOfAMSLeaveBalance.AMSLeaveBalance;
var message = {
“type”: “template”,
“payload”: {
“template_type”: “table”,
“text”: “Here is your leave balance”,
“columns”: [
[“Leave Type”, “center”], [“Availed”], [“Balance”, “right”]
“table_design”: “regular”,
speech_hint: “Here is your Leave balance”,
elements: []
var ele = [];
for (var i = 0; i < elements.length; i++) {
var elementArr = [elements[i].LeaveName, elements[i].LeaveAvailed, elements[i].LeaveBal];
ele.push({‘Values’: elementArr});
message.payload.elements = ele;

(Subrahmanyam Donepudi) #4

Hi @rajinisiva93, I have downloaded the latest webSDK from the public repository ( have executed the sample table templates on webSDK . They appear to be rendering fine. Please find the below snip for reference:

Could you please check the webSDK at the chatWindow.js file if the supporting templates are all present? Maybe downloading the webSDK again or replacing the chatwindow.js file could help…

(Siva L) #5

Thanks @Subrahmanyam its working. But whenever connect bot delay in enable Message textbox.

(Subrahmanyam Donepudi) #6

@rajinisiva93 , Great, glad I could help. Send message text box is usually enabled for the user on webSDK once the connection is established and the chat history is loaded.

(Siva L) #7

OKay, How can i enable load history, here history not loading.

(Subrahmanyam Donepudi) #8

Hi @rajinisiva93, Please refer to the below thread for enabling/disabling chat history at webSDK.

(Siva L) #9

Hi @Subrahmanyam this Script worked in my old webSDK now it is not working in new upgrade webSDK.

var link = '<a href="">Click Here</a>';  print(link);

(Subrahmanyam Donepudi) #10

We are looking into the problem and will get back to you soon. @rajinisiva93 Could you please raise new issues as new topics so that we wouldn’t be deviated from the main thread?

(Subrahmanyam Donepudi) #11

Hey @rajinisiva93, looking at the error in the console, I understand that ‘_detectedLink’ is not defined in the chatwindow.js file.
I have defined ‘’_detectedLink’ in the chatwindow.js file as variable and assigned the value ‘linkArray[x]’ to it.
Please add this in the webSDK at chatwindow.js file and you should have the issue resolved.

I have made the development team aware of the issue and they would correct the respective file in public repository soon.