Custom Functions for AdaptiveCards in JavaScript #6059
Unanswered
gabrielpassmann
asked this question in
Q&A
Replies: 1 comment
-
@gabrielpassmann I'm too trying to create a custom function in Javascript for Adaptive cards. I have created the function similarly, but when I try to use it my UI schema template, I get 'Unknown function error'. Do you know how can I use my custom function in my template schema ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all,
I've been trying to create a custom function in JavaScript for AdaptiveCards. See following code:
Simply put, i give the function a name, pass a callback function in which I simply wanna translate a key and return its translated value. The translation on it's own works fine. But when trying to invoke this custom function, it says that "i18n" is an unknown function. I invoked this function right before the templateData gets initialized.
Funny thing is, when I search for this custom function, it is listed up along all other built-in functions.
I know there is a tutorial on how to implement this on C# but not in JavaScript. Did i do it the right way or do I need to change something?
Beta Was this translation helpful? Give feedback.
All reactions