Enable/disable HREF attribute using IF statement (JSON)

%3CLINGO-SUB%20id%3D%22%5C%26quot%3Blingo-sub-3144516%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3EEnable%2Fdisable%20HREF%20attribute%20using%20IF%20statement%20(JSON)%26lt%3B%5C%2Flingo-sub%26gt%3B%3CLINGO-BODY%20id%3D%22%5C%26quot%3Blingo-body-3144516%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CP%3EThis%20is%20on%20SharePoint%20and%20I%20know%20just%20enough%20about%20JSON%20to%20ask%20questions%20and%20stumble%20my%20way%20through%20it.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20want%20to%20be%20able%20to%20create%20an%20IF%20statement%20that%20references%20%5B%24Another_Column%5D%20to%20determine%20if%20the%20current%20column%20will%20display%20that%20text%20as%20a%20hyperlink%20or%20just%20regular%20text.%20I%20want%26nbsp%3Bto%20keep%20the%20%22txtContent%22%3A%20%22%40currentField%22%20but%20change%20whether%20or%20not%20it's%20going%20to%20use%20the%20href%20attribute.%20Any%20advice%3F%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%3CU%3EHere's%20what%20I'm%20working%20with%20using%20the%20real%20column%20name%3A%26lt%3B%5C%2FU%26gt%3B%3CBR%20%2F%3EIf%26nbsp%3B%5B%24Link0%5D%20is%20empty%2C%20then%20I%20want%20the%20column%20to%20just%20display%20normal%20text%2C%20otherwise%2C%20I%20want%20the%20column%20to%20reference%20the%26nbsp%3B%5B%24Link0%5D%20as%20the%20href%20value.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20no%20clue%20how%20to%20create%20an%20if%20statement%20that%20determines%20if%20you're%20using%20a%20certain%26nbsp%3Battribute%20or%20not.%26nbsp%3B%3CBR%20%2F%3EThanks%20in%20advance%2C%3CBR%20%2F%3EJake%26lt%3B%5C%2FP%26gt%3B%26lt%3B%5C%2Flingo-body%26gt%3B%3CLINGO-LABS%20id%3D%22%5C%26quot%3Blingo-labs-3144516%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%26lt%3B%5C%2Flingo-label%26gt%3B%26lt%3B%5C%2Flingo-labs%26gt%3B%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3C%2FU%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-SUB%3E
Occasional Contributor

This is on SharePoint and I know just enough about JSON to ask questions and stumble my way through it.

I want to be able to create an IF statement that references [$Another_Column] to determine if the current column will display that text as a hyperlink or just regular text. I want to keep the "txtContent": "@currentField" but change whether or not it's going to use the href attribute. Any advice?

 

 

Here's what I'm working with using the real column name:
If [$Link0] is empty, then I want the column to just display normal text, otherwise, I want the column to reference the [$Link0] as the href value. 

I have no clue how to create an if statement that determines if you're using a certain attribute or not. 
Thanks in advance,
Jake

0 Replies