SOLVED

Need help with a quick snippet of code for the conditional formula for showing/hiding fields

%3CLINGO-SUB%20id%3D%22lingo-sub-2596442%22%20slang%3D%22en-US%22%3ENeed%20help%20with%20a%20quick%20snippet%20of%20code%20for%20the%20conditional%20formula%20for%20showing%2Fhiding%20fields%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2596442%22%20slang%3D%22en-US%22%3E%3CP%3Ehi!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20have%20this%20code%20and%20it%20works.%20When%20the%20campaign%20type%20is%20set%20to%20auto%2C%20this%20field%20will%20be%20visible.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3Dif(%5B%24CampaignType%5D%3D%3D%20'Auto'%2C%20'true'%2C%20'false')%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20it%20so%20that%20if%20the%20campaign%20type%20is%20Auto%20OR%20Home%20it'll%20appear.%20I%20tried%20the%20below%20but%20it%20doesn't%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3Dif(%5B%24CampaignType%5D%3D%3D%20'Auto'%20%7C%7C%20'Home'%2C%20'true'%2C%20'false')%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2596442%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2597120%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20help%20with%20a%20quick%20snippet%20of%20code%20for%20the%20conditional%20formula%20for%20showing%2Fhiding%20fields%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2597120%22%20slang%3D%22en-US%22%3E%3Dif(%5B%24CampaignType%5D%20%3D%3D%20'Auto'%20%7C%7C%20%5B%24CampaignType%5D%20%3D%3D%20'Home'%2C%20'true'%2C%20'false')%3C%2FLINGO-BODY%3E
Occasional Contributor

hi!

 

i have this code and it works. When the campaign type is set to auto, this field will be visible.

 

=if([$CampaignType]== 'Auto', 'true', 'false')

 

I want to it so that if the campaign type is Auto OR Home it'll appear. I tried the below but it doesn't work.

 

=if([$CampaignType]== 'Auto' || 'Home', 'true', 'false')

2 Replies
best response confirmed by chanpion13 (Occasional Contributor)
Solution
=if([$CampaignType] == 'Auto' || [$CampaignType] == 'Home', 'true', 'false')