// Part 1
Set(
dsCombined,
<Tablename>
);
// Part 2 Header row (quoted)
Set(
headerRow,
"""Period"",""Category"""
);
// Part 3 Body rows: build CSV lines, escape embedded quotes in every field
Set(
csvBody,
Concat(
dsCombined,
""""
& Substitute(period<Field name per data verse table> & "", """", """""")
& ""","""
& """"
& Substitute(category <Field name per data verse table> & "", """", """""")
& """"
& Char(13) & Char(10) // CRLF per row
)
);
// 3) Combine header + body
Set(
csvAll,
headerRow & Char(13) & Char(10) & csvBody
);
// 4) Trigger download (single-argument Download; BOM; replace '+' with '%20')
Download(
"data:text/csv;charset=utf-8," & EncodeUrl(csvAll)
);
We are getting error message with Part 4 download part, The URL passed to the function is not valid. Could some one please guide this is required on Canvas app or any other way to write download section.
Regards
Mohit