I have an issue to understand the else if statement, so basically if city is empty I want it to show: no rows found, I tried to add: %%[ if @rowCount > 1, from my understanding if there's city, then it shows the list, but if it's 0, it would show: No rows found
However, instead of showing: No rows found, it's still showing the person list eventhough the city is empty.
My question, when city is blank or there's no city, how to replace it with: No rows found?
%%[ set @city = AttributeValue("MailingCity") set @rows = LookupRows("TEST DE","TestCity", @city) set @rowCount = rowcount(@rows) ]%% %%[ if @rowCount > 0 then for @i = 1 to @rowCount do set @row = row(@rows, @i) /* get row based on counter */ set @Name = field(@row,"FirstName") set @TestCity = field(@row,"TestCity") ]%% %%=v(@i)=%% %%=v(@Name)=%% %%=v(@TestCity)=%% %%[ next @i ]%% %%[ else ]%% No rows found %%[ endif ]%%
%%
in front of the[
before yournext
statement. E.g.[ next @i ]%%
should be%%[ next @i ]%%