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

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

Solution Sage
Solution Sage

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.

View solution in original post

4 REPLIES 4
Memorable Member
Memorable Member

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 👍

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

Solution Sage
Solution Sage

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.

View solution in original post

Very simple and it's good for my needs.

 

Already implemented and working fine,

 

Thanks 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (7,096)