Forum Discussion

CindyZ's avatar
CindyZ
Iron Contributor
Jun 30, 2019

JSON Conditional Formatting - Clickable Action - Email

I'm using the "standard code" for clickable actions  in my SharePoint List on an assigned to field .  I'm running into two issues and wondering if someone might be able to help. 

 

1.   The link I want to use has this at the end All%20Orders.aspx.  Therefore, the code I'm using,  that I will list below, is translating that into the "entire hyperlinkAll Orders.aspx" which is returning a 404 error as it should since it shows a space instead of a continuous hyperlink.  I tried just removing the space but that still does not work.  What can I do to correctly translate this hyperlink?

 

2. I'd like to include in the body the Title of the Record and the PO number which are dynamic fields based upon the row selected.  Is there a way I can include those and exclude the "Hey, how is your task coming along message?  I've tried various ways with no success.  

 

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "span",
"style": {
"padding-right": "8px"
},
"txtContent": "@currentField.title"
},
{
"elmType": "a",
"attributes": {
"iconName": "Mail",
"class": "sp-field-quickActions",
"href": {
"operator": "+",
"operands": [
"mailto:",
"@currentField.email",
"?subject=Task status&body=Hey, how is your task coming along?.\r\n---\r\n",
"@currentField.title",
"\r\nClick this link for more info. http://contoso.sharepoint.com/sites/ConferencePrep/Tasks/Prep/DispForm.aspx?ID=",
"[$ID]"
]
}
}
}
]
}

 

Thank you in advance. 

10 Replies

Resources