My "uniqueID" variable is outputting System.Data.DataRow[]. I'm trying to display the value on the page upon success.
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3 col-sm-12">
%%[
if RequestParameter("submitted") == "submitted" then
var @email, @fullName, @accountNumber,
@checkAccountNumber, @numRows, @checkDE, @deNumRows, @createDeRecord,
@success, @fail, @uniqueID
set @fullName = RequestParameter('fullName')
set @email = RequestParameter('email')
set @accountNumber = RequestParameter('accountNumber')
set @checkAccountNumber = LookupRows('Unique_ID', 'AccountNumber', @accountNumber)
set @numRows = RowCount(LookupRows('Unique_ID','AccountNumber',@accountNumber))
set @checkDE = LookupRows('Unique_ID_Form_Submissions', 'EmailAddress', @email)
set @uniqueID = LookupRows('Unique_ID', 'UniqueID', @accountNumber)
set @deNumRows = RowCount(LookupRows('Unique_ID_Form_Submissions', 'EmailAddress', @email))
if @numRows > 0 then
set @success = 'I found your Unique ID'
elseif @numRows == 0 then
set @fail = 'I did not find your Account#'
elseif @deNumRows > 0 then
set @duplicatedFound = 'You have already submitted your information.'
endif
endif
endif
endif
]%%
<p id="success" style="color: green; font-family: arial, san-serif; font-size: 20px; font-weight: bold;">%%=v(@success)=%% %%=v(@uniqueID)=%%</p>
<p id="fail" style="color: red; font-family: arial, san-serif; font-size: 20px; font-weight: bold;">%%=v(@fail)=%%</p>
</div>
</div>
</div>
>
) generally isn't the right formatting tool to use when code is involved. Instead, I've used a code block, and tried to make your indentation consistent. Formatting as a code block means putting at least 4 blank spaces at the start of each line. The easy way to do that is to highlight your code/markup and press the{}
button (orctrl
+k
/cmd
+k
)