0

In plain english:
IF (messages >=1 AND reviews >=1) display both
IF (Messages >=1 AND reviews <1) display messages
IF (messages <1 and reviews>=1) display reviews

note, at least 1 of these two fields will be 1. ampscript attempt

%%[
Var @messagagecount
Var @numberreviews
Set @messageCount=AttributeValue("Message_count_30D")
SET @numberreviews=AttributeValue('Number_of_reviews__c")


IF (@messageCount>=1 AND @numberreviews>=1)

THEN SET @MessageBlock =Concat("TEXT TEXT TEXT",@messageCount,@Numberreviews)

ELSEIF (@messageCount>=1 AND @Numberreviews<1)

THEN SET @MessageBlock= Concat("TEXT TEXT TEXT",@messageCount,”TEXT TEXT TEXT”)

ELSE SET @MessageBlock=Concat("TEXT TEXT TEXT",@numberreviews,”TEXT TEXT TEXT”)

ENDIF ]%%

then to call out to it I am writing
%%=v(@MessageBlock)=%%

Where am I going wrong?

1

I am spotting a few issues, but it's difficult to say specifically what's causing your problem, or if this is just pseudocode.

  1. You're misspelling MessageCount in your VAR call.
  2. When you're setting @numberreviews you are starting AttributeValue with a single quote and ending it with a double quote.
  3. You're using curly quotes instead of straight quotes in a couple of spots.

Try fixing those first and see if things work.

  • @AaronKeil - if this answered your question, please make sure to mark it as correct (check mark in top left corner) so that others with the same issues will be able to reference it. – Gortonington Dec 5 '18 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.