[Rendering] Needing the ability to manipulate a URL in the markdown hyperlink
See original GitHub issueTarget Platform
Please list the platform(s) that your application is targeting and remove platforms you are not targeting:
- Microsoft Search
Target Application
Search Layout Designer
Problem Description
When presented with a url in a Microsoft Search result that came from a fileshare Graph Connector, the URL comes into the card in the form of:
\searchserver\Share\department\legal\project\DrawingsSpecifications.xlsx
However, the URL in order to be clickable in a browser needs to be manipulated to some other form, namely:
ms-excel:ofv|u|file:/accessserver/Share/department/legal/project/DrawingsSpecifications.xlsx
That can be performed using the following function:
${concat(\"ms-excel:ofv|u|file:/\",replace(replace(url,'\\\\','/'),'searchserver','accessserver'))}
However that doesn’t seem to be able to be used within a markdown link expression in a textbox.
Card JSON
{
"type": "AdaptiveCard",
"version": "1.3",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "auto",
"items": [
{
"type": "Image",
"url": "https://img.icons8.com/color/452/microsoft-excel-2019--v1.png",
"altText": "Thumbnail image",
"horizontalAlignment": "Center",
"size": "Small",
"isVisible": false
}
],
"horizontalAlignment": "Center"
},
{
"type": "Column",
"width": 10,
"items": [
{
"type": "TextBlock",
"text": "[${$root.title}](${concat(\"ms-excel:ofv|u|file:/\",replace(replace(url,'\\\\','/'),'searchserver','accessserver'))})",
"weight": "Bolder",
"color": "Accent",
"size": "Medium",
"$when": "",
"maxLines": 2,
"wrap": true
},
{
"type": "TextBlock",
"text": "${concat(\"ms-excel:ofv|u|file:/\",replace(replace(url,'\\\\','/'),'searchserver','accessserver'))}",
"spacing": "Small",
"$when": "",
"maxLines": 3
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "${$root.lastModifiedBy}",
"color": "Accent",
"size": "Medium",
"$when": "",
"maxLines": 3,
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "${$root.modifiedDateTime}",
"spacing": "Small",
"$when": "",
"weight": "Bolder",
"maxLines": 3
}
],
"$when": ""
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "${$root.createdBy}",
"color": "Accent",
"size": "Medium",
"weight": "Bolder",
"$when": "",
"maxLines": 3
},
{
"type": "TextBlock",
"text": "${$root.createdDateTime}",
"spacing": "Small",
"$when": "",
"weight": "Bolder",
"maxLines": 3
}
],
"$when": "",
"spacing": "Large"
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "Extension",
"color": "Accent",
"size": "Medium",
"weight": "Bolder",
"$when": "",
"maxLines": 3
},
{
"type": "TextBlock",
"text": "${$root.extension}",
"spacing": "Small",
"$when": "",
"weight": "Bolder",
"maxLines": 3
}
],
"$when": "",
"spacing": "Large"
}
]
}
],
"spacing": "Medium"
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
Version of SDK
What version are you using? Ex: NuGet 1.0.2, or latest main, etc…
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Interesting… I also coming across the same issue that MS-Search fileshare links are not clickable/working correctly. Are they already plans when the fix will be implemented?
Addressing this issue is not currently on our roadmap, so closing. Please feel free to continue the conversation in this issue for future consideration.