This function returns the number of rows in a row set.



Ordinal Type Required Description
1 String Y Row set from which to return the count


Data Extension: LoyaltyMembers

Name Data Type Length Primary Key Nullable Default Value
EmailAddress EmailAddress 254 N N
SubscriberKey Text 254 Y N
FirstName Text 50 N Y
Region Text 50 N Y
Rank Number N Y

The LoyaltyMembers Data Extension includes these rows:

EmailAddress SubscriberKey FirstName Region Rank 8473 Doug north 1 5497 Suzy North 3 7114 Dale West 2 5767 Barb North 1 5152 Curt north 2 7014 Nora South 1 8225 Leon East 3 9496 Lily East 1

Here is an example utilizing the preceding context:

var @rows, @row, @rowCount
var @region
set @region = "North"

set @rows = LookupRows("LoyaltyMembers","Region", @region)
set @rowCount = rowcount(@rows)

rowCount: %%=v(@rowCount)=%%


rowCount: 4