In a SharePoint List, I have a field of type ‘Hyperlink or Picture’ that has a URL like 'https://www.msn.com'
.
If the field is type text, I can do things like:
indexOf(@currentField, 'msn.com') > 0
If the field is type ‘Hyperlink or Picture’, this does not work.
What am I missing?
Update:
In the list view, it looks correct (note the correct icons):
When I add it to a page, the icons are not correct BUT the text is:
2
Answers
found a small typo in the logic, I believe this issue is closed.
I just tested this on our SharePoint online site with hyperlink column in list. Here are the results:
JSON used:
Where
Hyperlink
is the internal name of your SharePoint list column. You can get the internal name of your SharePoint list columns by following this article: How to find the Internal name of columns in SharePoint Online?Output:
So, you should be able to check for any substring in "link" in hyperlink column using expression like:
If you want to check for any substring in "description/display" text of hyperlink column, use JSON like:
Output:
Note:
indexOf
operator is case-sensitive