I'm extremely new to using AMPSCRIPTAMPScript, and wonder if any of you AMPSCRIPTAMPScript savvies can help me. I
I am trying to create an AMPSCRIPTAMPScript inside of an AMPSCRIPTAMPScript. The
The point to this HTML is to present the user a graph of his last 5 weeks of stats. If
If the user doesn’t have stat for 5 weeks but only 4 or 3 or 2 the stat’s graph will present only the weeks he have stat in. In
In my DE I have a column of flag_weekstartflag_weekstart
that helps me to determine how many weeks to present in the graph.
The 5Total
The 5Total
attribute represent the total stat a user has in week number 5 (5weeks5 weeks ago).
I
I am using this code:
<!--%%[
VAR @5Total
SET @5Total = AttributeValue("5Total")
VAR @weekstart1
IF [flag_weekstart] == "5" THEN
SET @weekstart1 = '
<table width="90%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="20%" style="border-top:3px solid #000000;">style="">
<span style="font-family:Verdana, Geneva, sans-serif;font-size:14px;color:#5B6770;text-align:center;"><center>Week of<br><span style="font-weight:bold;font-family:Verdana,style="">Aug Geneva,28</span>
sans-serif;font-size:18px;color:#5B6770;text-align:center;">Aug 28<br> </span></center> </span></td>
<td width="20%" style="border-top:3px solid #000000;">style="">
<span style="font-family:Verdana, Geneva, sans-serif;font-size:14px;color:#5B6770;text-align:center;"><center>Weekstyle="">Sep of<br><span04</span>
style="font-weight:bold;font-family:Verdana, Geneva, sans-serif;font-size:18px;color:#5B6770;text-align:center;">Sep 04<br> </span></center> </span></td>
<td width="20%" style="border-top:3px solid #000000;">style="">
<span style="font-family:Verdana, Geneva, sans-serif;font-size:14px;color:#5B6770;text-align:center;"><center>Week of<br><span style="font-weight:bold;font-family:Verdana,style="">Sep Geneva,11</span>
sans-serif;font-size:18px;color:#5B6770;text-align:center;">Sep 11<br> </span></center> </span></td>
<td width="20%" style="border-top:3px solid #000000;">style="">
<span style="font-family:Verdana, Geneva, sans-serif;font-size:14px;color:#5B6770;text-align:center;"><center>Week of<br><span style="font-weight:bold;font-family:Verdana,style="">Sep Geneva,18</span>
sans-serif;font-size:18px;color:#5B6770;text-align:center;">Sep 18<br> </span></center> </span></td>
<td width="20%" style="border-top:3px solid #000000;">style="">
<span style="font-family:Verdana, Geneva, sans-serif;font-size:14px;color:#5B6770;text-align:center;"><center>Week of<br><span style="font-weight:bold;font-family:Verdana,style="">Sep Geneva,25</span>
sans-serif;font-size:18px;color:#5B6770;text-align:center;">Sep 25<br> </span></center> </span></td>
</tr>
</table>
<table width="90%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="100%" style="border-bottom:1px solid #A3C70D;">style="">
<span style="font-weight:bold;font-family:Verdana, Geneva, sans-serif;font-size:18px;color:#A3C70D;text-align:left;"><center>Totalstyle=""><center>Total Measurements</center></span>
</td>
</tr>
</table>
<table width="90%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="20%">
<span style="font-weight:bold;font-family:Verdana, Geneva, sans-serif;font-size:18px;color:#A3C70D;text-align:left;"><center>%%=vstyle=""><center>%%=v(@5Total)=%%<br> </center></span>
</td>
<td width="20%">
<span style="font-weight:bold;font-family:Verdana, Geneva, sans-serif;font-size:18px;color:#A3C70D;text-align:left;"><center>%%4Total%%<br> <style=""><center>%%4Total%%<br> </center></span> </td>
</td>
<td width="20%">
<span style="font-weight:bold;font-family:Verdana, Geneva, sans-serif;font-size:18px;color:#A3C70D;text-align:left;"><center>%%3Total%%<br> <style=""><center>%%3Total%%<br> </center></span> </td>
</td>
<td width="20%">
<span style="font-weight:bold;font-family:Verdana, Geneva, sans-serif;font-size:18px;color:#A3C70D;text-align:left;"><center>%%2Total%%<br> <style=""><center>%%2Total%%<br> </center></span> </td>
</td>
<td width="20%">
<span style="font-weight:bold;font-family:Verdana, Geneva, sans-serif;font-size:18px;color:#A3C70D;text-align:left;"><center>%%1Total%%<br> <style=""><center>%%1Total%%<br> </center></span> </td>
</td>
</tr>
</table>table>'
]%%
The code is continuing with:
IF [flag_weekstart] == "4" THENIF [flag_weekstart] == "4" THEN
…
Until
Until 1.
I tried puling the 5Total5Total
attribute using %%=v(@5Total)=%%%%=v(@5Total)=%%
and %%5Total%%%%5Total%%
with no luck.
The value I am getting is %%5Total%%%%5Total%%
like the AMPSCRIPT doesn’tAMPScript doesn't know from where to pull the data from.