This repository was archived by the owner on Jul 9, 2025. It is now read-only.
How to create multiple button in hero card from an array (response from external api) #8936
Unanswered
tushaar9027
asked this question in
Q&A
Replies: 2 comments
-
herocardTemplate(image) [HeroCard buttons=${foreach(image, im,cardActionTemplate('messageBack', im.displayText,"{"msgbck": "" + im.qnaid+ ""}"))} ]cardActionTemplate( type, title, value) [CardAction type = ${if(type == null, 'messageBack', type)} Value = ${value} Text = ${title} Title = ${title} displayText = ${title} ]heroCards(response) -${herocardTemplate(response)}Using the above code snippet was able to add multiple buttons on a single HeroCard., here image is an array of json objects. Hope this helps in this case. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Had faced a similar usecase. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
If i hard code the button values like this it works
[HeroCard
title = BotFramework Hero Card
subtitle = Microsoft Bot Framework
text = Build and connect intelligent bots to interact with your users naturally wherever they are, from text/sms to Skype, Slack, Office 365 mail and other popular services.
image = https://sec.ch9.ms/ch9/7ff5/e07cfef0-aa3b-40bb-9baa-7c9ef8ff7ff5/buildreactionbotframework_960.jpg
buttons = SAP|Windows|Veeva
]
But the API is giving the Array of object and when i use join function on iterable it gives me string which doesn't work properly in buttons field
Output of join
buttons = "SAP|Windows|Veeva"
does anybody know or has any idea how to achieve this ?
Beta Was this translation helpful? Give feedback.
All reactions