I have some ampscript code to read from a data extension and populate the email template. When I go to preview I get this error.
"Invalid value specified for function parameter. Function Name: row Parameter Name: Index Parameter Ordinal: 2 Parameter Type: Numeric Submitted Value: ClientID: 7000859 JobID: 0 ListID: 0 BatchID: 0 SubcriberID: 116194632 Data Source Type: CustomObject Data Source ID: c609a413-3ee5-e911-a2d8-1402ec94b791"
I checked a previous post about naming the field parameter differently but that didnt help. If anyone has any ideas as to why this may be triggering the error that would be greatly appreciated.
%%[
Set @Rowcount = Rowcount(LookupOrderedRows("Consult_Notifications_Daily_followedreply",3,"date desc","EmailAddress",emailaddr))
IF @rows > 0 then
set @rows = LookupOrderedRows("Consult_Notifications_Daily_followedreply",3,"date desc","EmailAddress",emailaddr)
SET @RowTarget = Row(@rows,1)
set @followedReplyPostName = field(@RowTarget,"PostName_1")
set @followedReplyTargetURL = field(@RowTarget,"targeturl_1")
set @followedReplyRecipientName = field(@RowTarget,"RecipientName")
set @followedReplyUser = field(@RowTarget,"User_1")
set @followedReplyPostTitle = field(@RowTarget,"PostTitle_1")
set @followedReplyUserAccountUrl = field(@RowTarget,"UserAccountUrl")
set @followedReplyActorAccountUrl = field(@RowTarget,"ActorAccountUrl_1")
set @followedReplyThreadUrl = field(@RowTarget,"ThreadUrl_1")
set @followedReplyDate = field(@RowTarget,"Date")
set @followedReplyPostBody = field(@RowTarget,"PostBody_1")
set @followedReplyMentionedUser = field(@RowTarget,"MENTIONEDUSER")
set @followedReplyNotificationType = field(@RowTarget,"NotificationType")
set @followedReplyActorName = field(@RowTarget,"ActorNameDeg")
]%%
--><!--
%%[
IF not empty(@PostName_1) then ]%%
%%[ELSE]%%
%%[ENDIF]%%
-->
<tr>
<td style="padding: 7px 0 0 0;">
<table width="560" cellpadding="0" cellspacing="0" borde="0" class="container">
<tr>
<td align="center" valign="middle" style="padding:2px 2px 3px 1px; box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.09);" bgcolor="#dfdfdf">
<table width="558" class="container" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tr>
<td style="padding:20px 20px 20px 20px; font-size: 14px;" align="left">
<table width="508" class="container" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tr>
<td width="508" style="padding: 0 0px 0 0;" class="container" colspan="1" valign="top">
<table width="508" class="container" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" style="font-size: 18px;font-family: 'Roboto Condensed','Helvetica',Arial,sans-serif; font-weight: none; padding:0 0 10px 0; line-height: normal;">
<a href="%%=redirectTo(@followedReplyTargetURL)=%%" style="font-size: 18px;color: #000000;text-decoration:none;font-family: 'Roboto Condensed','Helvetica',Arial,sans-serif; font-weight: none; padding:0 0 10px 0; line-height: normal;">%%=v(@followedReplyPostName)=%%</a>
</td>
</tr>
%%[if not empty(@followedReplyPostBody) then]%%
<tr>
<td align="left" style="font-size: 14px;font-family: 'Roboto Condensed','Helvetica',Arial,sans-serif; font-weight: none; padding:0 0 10px 0; line-height: normal; color: #606060;">
%%=v(@followedReplyPostBody)=%% ..
<a href="%%=redirectTo(@followedReplyTargetURL)=%%" target="_blank" style="font-size: 14px;font-family: 'Proxima Nova','Helvetica',Arial,sans-serif; font-weight: normal; text-decoration: none; color: #007cb0;">read more</a>
</td>
</tr>
%%[endif]%%
<tr>
<td align="left" style="padding: 0px 0 0px 0; font-size: 14px;font-family: 'Proxima Nova','Helvetica',Arial,sans-serif; color: #3a3b3c;">
<a href="%%=redirectTo(@followedReplyActorAccountUrl)=%%" target="_blank" style="font-size: 14px;font-family: 'Proxima Nova','Helvetica',Arial,sans-serif; font-weight: normal; text-decoration: none; color: #007cb0;">%%=v(@followedReplyRecipientName)=%%</a> responded to your post on %%=v(@followedReplyDate)=%%.
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<!--%%[endif]%% -->
<!-- End script
-->
<!--
%%[
IF not empty(@postname2) then
]%%
-->
<tr>
<td style="padding: 7px 0 0 0;">
<table width="560" cellpadding="0" cellspacing="0" borde="0" class="container">
<tr>
<td align="center" valign="middle" style="padding:2px 2px 3px 1px; box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.09);" bgcolor="#dfdfdf">
<table width="558" class="container" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tr>
<td style="padding:20px 20px 20px 20px; font-size: 14px;" align="left">
<table width="508" class="container" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tr>
<td width="508" style="padding: 0 0px 0 0;" class="container" colspan="1" valign="top">
<table width="508" class="container" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" style="font-size: 18px;font-family: 'Roboto Condensed','Helvetica',Arial,sans-serif; font-weight: none; padding:0 0 10px 0; line-height: normal;">
<a href="%%=redirectTo(@followedReplyTargetURL)=%%" style="font-size: 18px;color: #000000;text-decoration:none;font-family: 'Roboto Condensed','Helvetica',Arial,sans-serif; font-weight: none; padding:0 0 10px 0; line-height: normal;">%%=v(@followedReplyPostName)=%%</a>
</td>
</tr>
%%[if not empty(@followedReplyPostBody) then]%%
<tr>
<td align="left" style="font-size: 14px;font-family: 'Roboto Condensed','Helvetica',Arial,sans-serif; font-weight: none; padding:0 0 10px 0; line-height: normal; color: #606060;">
%%=v(@followedReplyPostBody)=%% ..
<a href="%%=redirectTo(@followedReplyTargetURL)=%%" target="_blank" style="font-size: 14px;font-family: 'Proxima Nova','Helvetica',Arial,sans-serif; font-weight: normal; text-decoration: none; color: #007cb0;">read more</a>
</td>
</tr>
%%[endif]%%
<tr>
<td align="left" style="padding: 0px 0 0px 0; font-size: 14px;font-family: 'Proxima Nova','Helvetica',Arial,sans-serif; color: #3a3b3c;">
<a href="%%=redirectTo(@followedReplyActorAccountUrl)=%%" target="_blank" style="font-size: 14px;font-family: 'Proxima Nova','Helvetica',Arial,sans-serif; font-weight: normal; text-decoration: none; color: #007cb0;">%%=v(@followedReplyRecipientName)=%%</a> responded to your post on %%=v(@followedReplyDate)=%%.
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<!--%%[endif]%% -->
<!-- End script
-->
<!-- End Content -->
<tr>
<td align="center" class="mobile-pad-top-20" style="padding: 22px 0 0 0; font-size: 16px;font-family: 'Proxima Nova','Helvetica',Arial,sans-serif; font-weight: none; color: #3a3b3c; line-height: normal;">
<a href="%%=redirectTo(@followedReplyUserAccountUrl)=%%" target="_blank" style="font-size: 16px;font-family: 'Proxima Nova','Helvetica',Arial,sans-serif; font-weight: normal; text-decoration: none; color: #007cb0;">
See all your posts
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- -->
<!-- -->
<!--END -->
IF @rows > 0
toIF @Rowcount > 0
and condition should work as expected