Name Surname DOB
Tech Spec

Survey List — Technical Requirements

Screen Behaviour
  • Fetch all Survey records on load using Aggregate GetSurveys, sorted by Id ASC, paginated at 50 records per page.
  • Table columns: Name, Surname, DOB (formatted as d MMM yyyy).
  • Pagination component shows page numbers, total record count. Prev/Next and direct page number navigation.
  • Refresh button: calls Ajax.Refresh() on the Aggregate to reload table data without full page reload.
Excel Download
  • Clicking Download shows a spinner on the button while processing.
  • Server Action Survey_DownloadExcel: fetches all Survey records (no pagination), converts to Excel using ExcelUtils Forge component.
  • File is returned as Binary, served as application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.
  • File name: SurveyData_{CurrentDate}.xlsx. Triggered via Download widget linked to the binary output.
  • Spinner hides on completion or error.
Bulk Upload Flow
  • Only .xlsx files accepted. Validate file extension before upload.
  • No file size limit imposed at the application layer.
  • On Upload: call Server Action BulkUpload_SaveToBlob.
  • Step 1 — Insert record in CensusBulkUploadLog (IsProcessed = False) to obtain Id.
  • Step 2 — Construct BlobName: CensusBulkFil\{Id}_{yyyyMMddHHmmss}_{FileName}.xlsx.
  • Step 3 — Upload file Binary to Azure Blob using AzureBlobConnector. Read AzureBlobConnectionString and AzureBlobContainerName from Site Properties. Never hardcode.
  • Step 4 — Update log with final BlobName.
  • Step 5 — Trigger BPT Process ProcessBulkSurveyUpload (async). Do not wait.
  • Show confirmation message: "File uploaded. We will send you an email once processing is complete."
DB Table — CensusBulkUploadLog
ColumnTypeDefaultNotes
PKIdAutoNumberUsed in BlobName construction
FileNameText (255)Original file name
FileExtensionText (10).xlsx
BlobNameText (500)Set after blob upload
AddedByUserIdGetUserId()
CreatedOnDateTimeCurrDateTime()
IsProcessedBooleanFalseSet True on BPT completion
ProcessedOnDateTimeNullDate()Set on BPT completion
BPT — ProcessBulkSurveyUpload
  • BPT receives CensusBulkUploadLog Id as input parameter.
  • Reads file from Azure Blob using stored BlobName.
  • Iterates each row, validates Name (not empty, text only), Surname, DOB (valid date, not future).
  • Inserts valid rows into Survey entity. Logs invalid rows to BulkUploadErrorLog with row number and reason.
  • On completion: sends email via SendEmail action. Subject: "Census 2026 — Bulk Upload Complete". Body: total, inserted, failed counts.
  • Updates CensusBulkUploadLog: IsProcessed = True, ProcessedOn = CurrDateTime().
User Story — Background Vendor Data Sync

Context: The Government of Jupiter has contracted a third-party vendor to conduct census field operations. Vendor agents collect survey data through their own portal and store it in a vendor-side database exposed via a REST API.

Requirement: As a System, every night at 10:00 PM, a background OutSystems Timer named SyncVendorSurveyData must run automatically. The timer calls the vendor API, fetches new survey records submitted since the last sync, validates each record, and inserts them into the Survey entity — avoiding duplicates.

Vendor API: POST https://labs.lowcademy.com/apis/survey_api.php
Requires headers: key: 6221474d-b1e0-448f-901a-3d01885d3122 and secret: Lc@Census2026#SecretKey!
Returns a JSON array of records: { "data": [ {"Name":"...","Surname":"...","DOB":"YYYY-MM-DD"} ] }

Implementation steps: (1) Create a Consume REST API in OutSystems pointing to the vendor endpoint. (2) Configure OnBeforeRequest to inject auth headers. (3) Create Server Action VendorSync_FetchAndInsert that calls the REST method, loops the response list, checks for duplicate (Name + Surname + DOB match), and inserts new records. (4) Attach this Server Action to the Timer action. (5) Set Timer schedule to Daily at 22:00 in Service Center. (6) Log each sync run in VendorSyncLog (RunAt, RecordsFetched, RecordsInserted, Status).

Site Properties Required
  • AzureBlobConnectionString — Azure Storage connection string
  • AzureBlobContainerName — e.g. census-bulk-uploads
  • VendorApiKey — Vendor API key GUID
  • VendorApiSecret — Vendor API secret