Scenario:
I'm currently working on an OutSystems app to conduct surveys. The survey includes questions of various types, such as dropdowns, text, and dynamic tables for entering data related to different years. The challenge arises from having multiple table-type questions with different structured columns and rows, making it impractical to create separate database tables for each table-type question to store answers.
Current Approach:
I've decided to store the data in a structured format. Using SQL pivot statements, I've successfully achieved the desired structure to display the data. However, I'm struggling with updating the data back into the database.
Challenge:
The typical process involves identifying changed lines and using JSONDeserialization. However, the output is a pivoted table that doesn't align with the original structure of the database table.
I'm seeking suggestions or best practices on how to efficiently update data for survey questions, especially those involving dynamic tables, and handle the transformation back to the original database structure.
I would greatly appreciate any insights, ideas, or experiences that the community can share to help me overcome this challenge.