Web app on 6232
I'm populating a view box via the code down below. Data is coming from a list control. List control is populated by a MSSQL query.
In that sql query I'm using STUFF() to gather several rows of data and place them into one row (see part in red). SQL query down below too.
I'm getting an undesirable result in the view box. Instead of each address starting on a new line I'm getting one long string. You can see that in the SQL query I've added a '<br>' but that part isn't giving me the desired result.
I'm unsure how to best approach this. I've tried various different ways unsuccessfully. Any advice, etc. is always welcome. Thanks.
Ashampoo_Snap_Thursday, November 21, 2019_18h39m02s_001_.png
I'm populating a view box via the code down below. Data is coming from a list control. List control is populated by a MSSQL query.
In that sql query I'm using STUFF() to gather several rows of data and place them into one row (see part in red). SQL query down below too.
I'm getting an undesirable result in the view box. Instead of each address starting on a new line I'm getting one long string. You can see that in the SQL query I've added a '<br>' but that part isn't giving me the desired result.
I'm unsure how to best approach this. I've tried various different ways unsuccessfully. Any advice, etc. is always welcome. Thanks.
Code:
SELECT fs.id, fs.FS_Type, fs.FS_Status, fs.ReceivedDate, fs.ExpirationDate, CONVERT(nvarchar(MAX),fs.ComplianceDate,0) AS ComplianceDate, fs.ServeTo,fs.Instructions, fs.Documents,ISNULL(fs.Additional_Instructions,'None.') AS Additional_Instructions, (SELECT c.Case_Number FROM cases c WHERE fs.CaseID = c.ID) AS Case_Num,fs.hasSuccessfulTrigger, (SELECT c.ClientReference FROM cases c WHERE fs.CaseID = c.ID) AS Client_Ref, [COLOR="#FF0000"]STUFF((SELECT '<br>' + fsa.Address FROM dbo.FS_Alt_Addresses fsa WHERE fsa.FSID = fs.ID FOR XML PATH ('')),1,1,'') AS Addresses[/COLOR] FROM Field_Sheet fs WHERE ISNULL(isArchived, 0) = 0 AND fs.Server_UserID = :USERID AND ISNULL(fs.hasAffidavit, 0) = 0 ORDER BY fs.ReceivedDate DESC
Code:
//Get some list data var lObj = {dialog.Object}.getControl('FieldSheets'); var data = lObj.selectionData; //Populate viewbox var vbObj = {dialog.object}.getControl('FS_VB'); vbObj.populate(data);
Comment