Kelam Sandesh - Hi all,Can anyone please help ...

Hi all, Can anyone please help me to get answer name along with answerid while saving an answer in an embed data source please.
3 Replies
Justin Mathew
Justin Mathew3w ago
hey @Kelam Sandesh , yes currently most events for save give out answerid however you can try using the getAnswerService
tsEmbed.getAnswerService().then(answerService => async {

const data = await answerService.getAnswer();
console.log(data)
})
tsEmbed.getAnswerService().then(answerService => async {

const data = await answerService.getAnswer();
console.log(data)
})
this will give a more detailed data eg:
{
"id": "800634e7-a9c8-403f-94fd-eb801f35c7c3",
"name": "Brand1",
"description": "",
"displayMode": "UNDEFINED",
"sources": [
{
"header": {
"guid": "540c4503-5bc7-4727-897b-f7f4d78dd2ff",
"displayName": "Parameters WS"
}
}
],
"filterGroups": null,
"metadata": {
"author": "Administrator",
"authorId": "59481331-ee53-42be-a548-bd87be6ddd4a",
"createdAt": "1755605953385",
"isDiscoverable": false,
"isHidden": false,
"modifiedAt": "1755605953385"
},
"visualizations": [
{},
{
"id": "bc28de57-1603-49c1-90a2-6d49017f152b",
"columns": [
{
"column": {
"id": "785be9a2-5ff0-415f-bc92-d21e6c8b0b3e",
"name": "Brand1",
"referencedColumns": [
{
"guid": "a3c72e93-446b-4317-8384-d61dd1e32981",
"displayName": "Brand1"
}
]
}
}
]
},
{
"id": "6b48be60-5157-4b49-a79a-f5794c3b458c"
}
]
}
{
"id": "800634e7-a9c8-403f-94fd-eb801f35c7c3",
"name": "Brand1",
"description": "",
"displayMode": "UNDEFINED",
"sources": [
{
"header": {
"guid": "540c4503-5bc7-4727-897b-f7f4d78dd2ff",
"displayName": "Parameters WS"
}
}
],
"filterGroups": null,
"metadata": {
"author": "Administrator",
"authorId": "59481331-ee53-42be-a548-bd87be6ddd4a",
"createdAt": "1755605953385",
"isDiscoverable": false,
"isHidden": false,
"modifiedAt": "1755605953385"
},
"visualizations": [
{},
{
"id": "bc28de57-1603-49c1-90a2-6d49017f152b",
"columns": [
{
"column": {
"id": "785be9a2-5ff0-415f-bc92-d21e6c8b0b3e",
"name": "Brand1",
"referencedColumns": [
{
"guid": "a3c72e93-446b-4317-8384-d61dd1e32981",
"displayName": "Brand1"
}
]
}
}
]
},
{
"id": "6b48be60-5157-4b49-a79a-f5794c3b458c"
}
]
}
Kelam Sandesh
Kelam SandeshOP3w ago
Hi @Justin Mathew , But may I please know, where can I write this? Immediately after listening to save event? Because I want to save the ID and name in a same form control!?
Justin Mathew
Justin Mathew3w ago
yes after save event would be a good place to do this

Did you find this page helpful?