I currently have a computed field that is using HTML to display a link similar to the following on the item details tab:
123456A123/McMaster-Carr Supply Co.
However, when I include this either in a BOM or view this field in a preview, the HTML is not rendered properly. It just gets displayed like this (including the incorrect URL behind the link):
<a href="http://www.mcmaster.com/#123456A123">123456A123/McMaster-Carr Supply Co.</a>
Is this a bug, or have I entered something incorrectly?
If there is any further information that you need to be able to help you, just let me know and I'll be happy to provide it.
Solved! Go to Solution.
Solved by nguyentru. Go to Solution.
Hi Tim,
Based on your post, I ran some tests in my environment and I wasn't able to replicate or reproduce the issue.
1. I created a Field Link in the Item details with computed field - '<A HREF="http://www.mcmaster.com/#123456A123">123456A123/McMaster-Carr Supply Co.</A>' and add to the view in the BOM.
2. I created a Field Link2 in the BOM Tab with computed field - '<A HREF="http://www.mcmaster.com/#123456A123">123456A123/McMaster-Carr Supply Co.</A>' and add to the view in the BOM
As you can see from the image, the link / link 2 displayed correctly.
Please give it another try with my formula.
Feel free to email me directly if the issue still exists.
Thanks,
Trung
More explanation for any that come here with the same issue:
The data pulled from a field into the BOM tab is the raw text of the field. The Item Details tab interprets any HTML that may be contained, but the BOM doesn't. Therefore, you end up seeing the raw HTML on the BOM tab. The workaround for this is to create a second computed field on the Item Details tab (which you could potentially hide from the user by placing it in a section visible only to admin users). Use the script to populate this field, then have the original field be a computed field set equal to the value of the field set by the script.
TL;DR - You can't use a script to generate an HTML field that will be directly shown on the BOM tab.