Hi,
I have a List Control which contains a field which is a Lookup field. By default this displays as a hyperlink.
How do I change this to remove the hyperlink behaviour?
Hi,
I have a List Control which contains a field which is a Lookup field. By default this displays as a hyperlink.
How do I change this to remove the hyperlink behaviour?
Hi @peter.harrison,
Try creating a custom template for the lookup column as described here. The code should look something like this:
const value = ctx.row.LookupColumnName;
if (!value) {
return '';
}
return value.map(function(v) {
return v.lookupValue;
}).join(', ');
Hi Ilia,
I appreciate the range of customizations that are possible.
But I really just need help to understand how to format a lookup field as plain text rather than as a hyperlink.
Any specific help on this would be very greatly appreciated.
thank you
Hi @peter.harrison,
That's what the code I provided does. It modifies the settings of a List or Library column so it only displays the lookup's text.
You need to put this into the Custom property of the column. Don't forget to replace LookupColumnName with the actual name of the column.
A more detailed instruction can be found here: https://plumsail.com/docs/forms-sp/designer/controls/list-or-library/list-or-library-columns.html
Perfect - my mistake, I must have misread it
It works like a dream.
thank you Ilia!!
Hi Ilia, after working with this for a while it is clear that it doesn't work as intended.
The Lookup fields in the List Control are text, BUT they no longer operate as drop downs.
Can it be formatted to behave as a Lookup field but without the hyperlink?
Many thanks,
const value = ctx.row.Theme;
if (!value) {
return '';
}
return value.map(function(v) {
return v.lookupValue;
}).join(', ');
Hi @peter.harrison,
I'm not sure what could prevent the Lookup fields from acting like dropdowns. Could you share a screen capture video of the problem?