Effective Data Structure

Effective Data Structure

  

Hi,

I'm working on a Proof of Concept where a Form one is filling in you can add information about only 1 of over 25 Products.

Each Product has it's own Structure. (There is very little commonality)

Do I create one overall Structure that includes the first part of the form and all the Product Attributes for each product(meaning a lot of blank data is carried), or do I create 25 structures and select the structure dependent on what Product is Selected via a Switch statement. Is this option feasible?

N.B to select a Product, you choose the Product from a Dropdown and this selects which webblock is shown. I have a web block containing a very large Nested IF to aid with this.

What I have does work, but I am concerned it might not be the best solution.


Edward

Solution

Edward S wrote:

Hi,

I'm working on a Proof of Concept where a Form one is filling in you can add information about only 1 of over 25 Products.

Each Product has it's own Structure. (There is very little commonality)

Do I create one overall Structure that includes the first part of the form and all the Product Attributes for each product(meaning a lot of blank data is carried), or do I create 25 structures and select the structure dependent on what Product is Selected via a Switch statement. Is this option feasible?

N.B to select a Product, you choose the Product from a Dropdown and this selects which webblock is shown. I have a web block containing a very large Nested IF to aid with this.

What I have does work, but I am concerned it might not be the best solution.


Edward

Hi Edward,

As per your explanation , you need to fill different product details with different attribute/Fields by a Single form.

As a best practice with OutSystems you need to a have a single Structure for all your product attribute .

And for displaying - need to have single webblock , which will show data as per selected attribute.. show attribute controls if data is not empty , otherwise hide.

Regards,

Rafi 



Solution

Cheers Rafi