Timeline for Help Required: Using an Empty function to set a variable
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 21, 2021 at 20:34 | vote | accept | Benjamin Penketh | ||
Nov 16, 2020 at 7:52 | comment | added | Jonas Lamberty |
just reduce your IF logic to one condition at a time and systematically isolate. maybe the problem is @hasUFB ? If you set this to true earlier in the code and it's not coming from a field, then use @hasUFB == true without the quotes as this could be a boolean, not a string.
|
|
Nov 15, 2020 at 19:46 | comment | added | Benjamin Penketh |
And I'm using this IF statement to print the content block; %%[IF @newFibre!="False" THEN]%% However, it is still determined not to print the content :( Any help would be greatly appreciated.
|
|
Nov 15, 2020 at 19:45 | comment | added | Benjamin Penketh |
I've gone with example 2 and your suggestion around using AttributeValue. In printing the variable values, my test variable: %%=v(@hasUFB)=%% and %%=v(@fibreDate)=%%. And may as well print %%=v(@newFibre)=%% returned; True and 4/21/2020 12:00:00 AM. And may as well print False. Perplexed as I updated the AMPscript block to: %%[ VAR @fibreDate, @newFibre SET @fibreDate= AttributeValue("Opportunity:Fibre_Service__r:First_Fibre_Connected_Date__c") IF @hasUFB == 'True' AND not empty(@fibreDate) THEN SET @newFibre = "False" ENDIF ]%%
|
|
Nov 15, 2020 at 19:38 | comment | added | Benjamin Penketh | Hi Jonas, thank you so much for the answer above - that detail certainly helped get me on the right track. | |
Nov 14, 2020 at 13:39 | history | answered | Jonas Lamberty | CC BY-SA 4.0 |