I am using SharePoint Online and have a list
I have two columns:
- Department (single line of text)
- Logo (URL formatted showing as a picture)
I have formatted the Logo column as follows:
{"elmType":"div","children":[{"elmType":"img","attributes":{"src":"@currentField","title":"=if(@currentField == '', 'No picture available', @currentField)"},"style":{"position":"relative","top":"50%","left":"50%","width":"200px","height":"200px","margin-left":"-50%","margin-top":"0%"}}]}
What I want is that is the column called "Department" is "No1" then the Logo column will be 50% scale.
If the Department is "No2" then the Logo column will be "20%" scale.
If the Department is "No3" then the Logo column will be "35% scale".
Current JSON for gallery is:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json" }
Column Name: Department Internal Field Name: Title Field Type: Single Line of Text
Column Name Logo: Internal Field Name: Logo Field Type: Hyperlink or Picture Format URL as Picture