Hi,
I have a sharepoint list where there were different columns to receive data from a form, one of these columns is of the hyperlink type.
I intend that for this type of column, the Display Text propertie is set to VIEW DOCS and the URL is the path indicated by the value received by the form. At this moment the 2 properties receive the same content.
How do I do that?
Thank you.
Solved! Go to Solution.
Hi @skindu
In addition to the method shown by @Paulie78 it's also possible to do it like below using JSON column-formatting (SP Column-->Column Settings-->Format this column-->Advanced Settings or New Column-->More...)
This Flow takes email address from "FormEmailAddfress" Form field and creates a dynamic link to the user's Sharepoint email folder using your example with hyperlink type SP columns.
Sources
Flow
Sharepoint Reference
I've shown 2 ways above (tested).
The first JSON formatted column references itself and will only work once you implement JSON formatting on the SP column and after the form starts capturing responses. The second JSON references a separate email address column and will work with data already existing in that column. There's a third way also where you could construct the URL based on a hidden email column.
The code:
MY SP URL
h t t p s://atnypa.sharepoint.com/Shared%20Documents/Forms/AllItems.aspx?id=UserSPEmailFOlder
You will have to reference your SP.
JSONs:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"txtContent": "View Docs",
"attributes": {
"target": "_blank",
"href": "=@currentField"
}
}
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"txtContent": "View Docs",
"attributes": {
"target": "_blank",
"href": "='https://SPtenant.sharepoint.com/Shared%20Documents/Forms/AllItems.aspx?id' + [$emailaddress]"
}
}
Note the Flow references.
Hope this helps,
Aman
------------------------------------------------------------------------------------------------------
If my post helps you with your problem or answers your question, please mark it Solved or Answered. This helps anyone with similar challenges. If you like my response, please give it a Thumbs Up.
------------------------------------------------------------------------------------------------------
I'd use the JSON formatting for that as already mentioned in one of the posts if you're using Modern experience.
But there's one more option that will work also in the Classic experience. You can change the column to 'Multiple lines of text' column with 'Rich text', and then update the html code <a href="....">VIEW DOCS</a> in that column.
It is much more difficult than you would imagine. First take a look at this flow action:
The code in the body:
{'__metadata': {'type':'SP.Data.Test_x0020_List_x0020_PowerAppsListItem'},'Test':
{'Description': 'Power Automate Community',
'Url': 'https://powerusers.microsoft.com/t5/Forums/ct-p/FL_Comm_Forums'}
}
Bit more detail:
{'__metadata': {'type':'SP.Data.NameOfListListItem'},'NameOfColumn':
{'Description': 'Hyperlink Display Text',
'Url': 'https://hyperlinkHere'}
}
This will create a hyperlink like this:
Let me know if you get stuck!
Please, If I answered your question Accept it as a solution ✔️ If I was helpful, please give me some Kudos 👍
Hi @skindu
In addition to the method shown by @Paulie78 it's also possible to do it like below using JSON column-formatting (SP Column-->Column Settings-->Format this column-->Advanced Settings or New Column-->More...)
This Flow takes email address from "FormEmailAddfress" Form field and creates a dynamic link to the user's Sharepoint email folder using your example with hyperlink type SP columns.
Sources
Flow
Sharepoint Reference
I've shown 2 ways above (tested).
The first JSON formatted column references itself and will only work once you implement JSON formatting on the SP column and after the form starts capturing responses. The second JSON references a separate email address column and will work with data already existing in that column. There's a third way also where you could construct the URL based on a hidden email column.
The code:
MY SP URL
h t t p s://atnypa.sharepoint.com/Shared%20Documents/Forms/AllItems.aspx?id=UserSPEmailFOlder
You will have to reference your SP.
JSONs:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"txtContent": "View Docs",
"attributes": {
"target": "_blank",
"href": "=@currentField"
}
}
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"txtContent": "View Docs",
"attributes": {
"target": "_blank",
"href": "='https://SPtenant.sharepoint.com/Shared%20Documents/Forms/AllItems.aspx?id' + [$emailaddress]"
}
}
Note the Flow references.
Hope this helps,
Aman
------------------------------------------------------------------------------------------------------
If my post helps you with your problem or answers your question, please mark it Solved or Answered. This helps anyone with similar challenges. If you like my response, please give it a Thumbs Up.
------------------------------------------------------------------------------------------------------
I'd use the JSON formatting for that as already mentioned in one of the posts if you're using Modern experience.
But there's one more option that will work also in the Classic experience. You can change the column to 'Multiple lines of text' column with 'Rich text', and then update the html code <a href="....">VIEW DOCS</a> in that column.
Very simple and it's good for my needs.
Already implemented and working fine,
Thanks
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.