The text block of an Adaptive card supports markdown. So you can have a formatted list for example in a block with the value:
However, if you set a variable to that string and use that variable in an adaptive card, it does not display as markdown. This makes formatting results from API calls or OpenAI sub-par.
See attached photos.
Figured out a temporary workaround. In the variable you will have to replace instances of "\n" with an explicit call to Char(10) to force an actual newline into the string.
Substitute(dataToDisplay, "\n", Char(10))
In our case, the data source is sending data back stripped of newlines and no formatting. So we have to do something a little more intense:
Substitute(Substitute(Substitute(dataToDisplay, "1.", Char(10) & "1."), "2.", Char(10) & "2."), "3.", Char(10) & "3.")
It's not a scalable / maintainable solution, but gets us some formatting for now.
Pablo Roldan
33
Romain The Low-Code...
25
stampcoin
10