Dynamic Markdown
I've got a form with a few blank text boxes in them. Those textbox descriptions are created during the on load event based on variable values.
Effectively I iterate through each of those variables and add a hyperlink to a textbox. I'm just having a bit of trouble attempting to figure out how to actually use replacement tokens in the syntax.
=$JsonForm.state.text2019.description.markdown += "[`${$foreach.item.name}`](`${$foreach.item.link}`)"+"\n\n"
the result of this is a textbox with a description of "${$foreach.item.name}" and a link of "{$foreach.item.link}". I'm quite sure it just takes everything inside as text.
What I'm going for is to use the foreach.item's values to populate the markdown values.
-
There's a mix of string concatenation and template literals in that expression. I think it'll be easier to stick to just one format. With just template literals, the whole expression inside `` is read as string, except for anything that you put inside of ${} placeholders, which gets evaluated as an expression and replaced. It'll be something like this:
=`${$JsonForm.state.text2019.state.text2019.description.markdown}[${$forEach1.item.name}](${$forEach1.item.link})\n\n`I attached a test workflow that ran successfully on my end.
0
Please sign in to leave a comment.
Comments
1 comment