16
Views
1
Comments
Getting started - Demo Application 101
Application Type
Reactive

Hi there,

I'm starting to learn OutSystems and after i get some paths available on the Lear section, i'm starting to put this in practice.

I'm trying to create a simple application with 3 tables:

  • Master table with static values
    • Child Table
      • Sub-Child Table

My idea is to show the values accordingly to the relations between them, meaning:

  • If i choose Item1 from the Master Table (choose from a dropbox), it will open a container (List) with all Child's that belong to it
  • After that, when i choose a Child from that list, it will open a new container (other List) with all Sub-Childs that belong to that Child.

The idea is to create relations between the container and filter the data that must show to the end-user.


I also created a new screen (AddChild) where the user can add new Child's and Sub-Child's. For this, i created a checkbox that will change the form for each option.


Saying that i'm now struggling with some issues, and i hope the community can help me:

  • When i created the Events "SaveChildOnClick" and "SaveSubChildOnClick", gave me 2 security warnings:
    • Security Warning: You're exposing a database operation in the client side. Validate the data in a Server Action before changing the database.
    • Why is this happening, and how can it be solved?
  • I don't know why, but the radio button on the screen AddChild don't change and it start always with option "Sub-Child"
    • Without this, i can't validate if the other things are well done (it doesn't have any data inserted)
  • In the "Demo" screen, did i created the relations Master (Dropbox) -> Child (List) -> Sub-Child (List) correctly?


I attached the .oml file that i'm using for this demo.


Next steps that are programmed to implement in this demo:

  • Create an option to delete Child's and Sub-Child's
  • Edit Child's and Sub-Child's
    • For this, i will try to use the same screen from AddChild
  • Create validations
    • Only delete Child's if there isn't any Sub-Child associated
  • Insert Pagination
  • ... (i'm open to new suggestions)




Hope this thread helps others that are also starting.


P.S. - If you think that there is a better way to do this, feel free to share it. Like i said in the beginning, i's still doing my first steps here, and every input from more expert users will be great to help me how to look at some issues, challenges, and best practices.

P.S. 2 - The idea is that i can create an application (let's call it 101) from scratch that will aggregate relations, widgets, actions, and all the other basics so that others, that are starting -as like me-, can look at it and can find the logic between then. 


Thank you in advanced


Best regards

João Ferreira

Demo2.oml

Hi! 

You have a lot of questions !!!

"When i created the Events "SaveChildOnClick" and "SaveSubChildOnClick", gave me 2 security warnings:

  • Security Warning: You're exposing a database operation in the client side. Validate the data in a Server Action before changing the database.
  • Why is this happening, and how can it be solved?"

Updates to the database should be done in server actions and those actions should verify is the fields content is the expected, to avoid that some "foxy" user alter the client action and send wrong data to the database.

You can create a server action that validates and saves the information and replace the "CreateOrUpdate..." by that action. 

I don't know why, but the radio button on the screen AddChild don't change and it start always with option "Sub-Child"

  • Without this, i can't validate if the other things are well done (it doesn't have any data inserted)

The radio buttons start like that because they verify the situation from "addOption" variable and at start that variable is "false". 

it do not work probably because you are doing the assignment 

 wrong , it should be 

Hope this help 

Graça