cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
skindu
Helper III
Helper III

Form to sharepoint - column Hyperlink

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.

Imagem2.jpg

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.

 

Imagem1.jpg

How do I do that?

 

Thank you.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Amanthaper
Responsive Resident
Responsive Resident

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

PAUG_FormtoSPhrefcolumn1 - Copy.png

Flow

PAUG_FormtoSPhrefcolumn3 - Copy.png

Sharepoint Reference

PAUG_FormtoSPhrefcolumn2 - Copy.png

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.
------------------------------------------------------------------------------------------------------

View solution in original post

tom_riha
Super User
Super User

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.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

4 REPLIES 4
Paulie78
Super User
Super User

It is much more difficult than you would imagine. First take a look at this flow action:

Hyperlink.png

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:

Hyperlink2.png

 

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 👍

Amanthaper
Responsive Resident
Responsive Resident

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

PAUG_FormtoSPhrefcolumn1 - Copy.png

Flow

PAUG_FormtoSPhrefcolumn3 - Copy.png

Sharepoint Reference

PAUG_FormtoSPhrefcolumn2 - Copy.png

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.
------------------------------------------------------------------------------------------------------

tom_riha
Super User
Super User

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.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Very simple and it's good for my needs.

 

Already implemented and working fine,

 

Thanks 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,314)