Oct 30 2023 11:20 AM
Oct 30 2023 11:20 AM
I have a SPO list. Within the list is a Name and a Link to Materials column. The Link to Materials column is a calculated column that links the user to a filtered document library view based on the Name of the List item. When I click on the Name (Critical Thinking), the edit form populates on the righthand side of the page and the Link to Materials column shows but does not show up as a link. I'm trying to figure out how to get that field within the edit form to show up as a link and work the same as clicking the link from the list view. Any suggestions for making this happen?
Below, Link to Materials. I want this to show as a link, similar to how it is displayed and works on the list view.
Oct 30 2023 10:27 PM
@MeganP2095 I think you may need to use PowerApps to customize your edit form and use the HTMLText control and use the value of your calculated column to get it to display the hyperlink in the Edit form.
Oct 30 2023 10:47 PM - edited Oct 30 2023 10:50 PM
@MeganP2095 I did a quick PoC with PowerApps and here is what my Edit form looks like afterwards:
** NOTE: You can hide the markup if you wanted to. For the purposes of my PoC I just wanted to show it.
In my case, I just created and added an HtmlText control and set the value using the calculated column markup. It's just pointing to the same list view with that filters the list items using the Sum value. DataCardValue6 is the calculated column value which is what generates the HTML markup.
Please like and mark as best response if this helps you :)
Oct 31 2023 05:19 AM
Can you show us the formula you used for calculated column (Link to Materials)?
SharePoint Online does not support using HTML in calculated column formulas.
Maybe you can achieve it easily using JSON formatting instead of using calculated column or Power Apps.
Share the current calculated column formula you are using and I will see if I can provide the JSON formatting solution for it, if possible.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Nov 01 2023 11:17 AM
@ganeshsanap Here is the column info, including the current JSON formatting. I haven't used PowerApps yet but have some trainings scheduled over the next few months, so if I can do this without creating a new form in PowerApps, I think that would be preferred. Thanks for your help!
"txtContent": "= ' ' + [$Title]",
"href": "= @currentWeb + '/Part%20C%20Materials/Forms/AllItems.aspx?FilterField1=Lesson_x0020_Name&FilterType1=Choice&FilterValue1=' + [$Title]",
Nov 01 2023 11:21 AM
Seems easy enough to follow. I was hoping to avoid PowerApps as I haven't worked with it yet but what better time to jump in than now! I appreciate your input and I will give this a try and be back with an update.
Nov 02 2023 07:19 PM - edited Nov 08 2023 08:00 PMSolution
@MeganP2095 sounds good. FYI, no advanced formatting can be applied to modify the Edit/New/View forms directly. PowerApps and SPFx Form Customizer are the only way to modify those. I know this since I've had to do this for clients. SPFx is for developers, and PowerApps is for power users/developers.
** Note: You don't have to use a calculated field. I was showing one possibility using a calculated field. You can use the HtmlText and manipulate insert whatever you need in there as a filter for your view.