This code makes that the outlook windows opens automatically when we press the "email" button and takes the email that has been saved in the "Kontakt" Field. We need to complete this code so when we press the button it automatically takes the subject for an email saved in another field. Is it possible with this JSON code?
{
"_comment": "A button to send an email",
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"attributes": {
"class": "ms-fontColor-black ms-fontColor-white--hover",
"title": "Send Email",
"href": "='mailto:' + [$Kontakt.email]",
"target": "_blank"
},
"style": {
"border": "none",
"cursor": "pointer",
"background-color": "transparent"
},
"children": [
{
"elmType": "div",
"attributes": {
"class": "ms-bgColor-greenLight ms-bgColor-green--hover ms-fontColor-black ms-fontColor-white--hover"
},
"style": {
"font-size": "16px",
"font-family": "arial",
"border": "1px solid Black",
"border-radius": "7px",
"padding": "3px 5px 3px 5px",
"box-shadow": "2px 2px #999"
},
"children": [
{
"elmType": "div",
"attributes": {
"iconName": "Mail"
},
"style": {
"display": "=if('Mail' != '','inline-block','none')",
"vertical-align": "middle",
"padding-right": "5px"
}
},
{
"elmType": "div",
"txtContent": "=if('' != '',' EMAIL',' EMAIL')",
"style": {
"display": "inline-block",
"font-family": "arial",
"vertical-align": "middle"
}
}
]
}
]
}