Forum Discussion
pjuvish
Nov 01, 2021Copper Contributor
Need help putting a dynamic content in if( , , ) function
Hi experts! I am trying to create a condition of whether there is a response from my MS Form. If no, I want it to leave a blank space but if yes, I want to add some HTML <li> </li> and a respons...
DanWatford
Nov 08, 2021Copper Contributor
Hi pjuvish
It's not clear to me what you mean by 'it turns out to be invalid'. Are you getting some sort of error displayed in your browser? Are you generating an HTML file?
I imagine you are getting the literal "Destination: outputs('Get_...." in your result. If so then you need to concatenate some string parts together.
Please see if the following works for you:
if(empty(outputs('Get_response_details')?['body/rbd8730a075a74ca4a315dae7b898c2f4'])," ","<li>Destination: " & outputs('Get_response_details')?['body/rbd8730a075a74ca4a315dae7b898c2f4'] & "</li>")