Aggregates... cross joins... linking of 2 or more tables

Aggregates... cross joins... linking of 2 or more tables

  
i had previous asked a question about link tables together... but i am stuck.. and confused.

first off i have 3 entities.... Doctors.. DoctorType.. and Location.. the primary key for them are Doctors.Id. .. DoctorType.Id and Location.Id.

i have tried : http://www.outsystems.com/academy/11/1692/609/get-even-better-usability-with-real-data/ .. but in version 9 as i pointed they have an aggregate system in place.
Now i have tried to do what they suggestion in the post on the video... but for nothing i am getting the tables to be linked...









I have gone through serval Joins and even some filters... but it never links the tables :( .. i am pulling my hair out trying to understand WHY.

Any pointers would be greatly appreciated.
HI Andre,

As the error states your Aggregate is not connected with the rest of the logic in that action. Try to drag the aggregate on top of the connector until it changes from black color to blue color to connect it.
Hi Andre,
 
do you saw the entire videos from "Model and Query Data"? On the first videos of chapter they explain how you must link your entities according to the relationships you want.

In addition to Andre Vieira said it's seems you do not did yet the relationships between entities, because when you drag and drop the doctors entity all others entites must be linked already, and from the image you putted, they are not (automaticaly) linked. If you already did relationships between entities put here an image from your "entities diagram" helps to explain how you can link the entities in the aggregate manually.
 
Best regards,
Gonçalo Azambujo
 

my diagrams..







The above is the conditions for my joining of 2 entities.

Here is my filter..

And this is the errors:

Now i know the DoctorType Identitier can be easily fixed... but the join is not even creating a preview of the data... i hope i am making sense..
now is it that i have jointed the entities wrong ?
Before you set the query filter, click "1-Click Publish" to create and populate your entities, then see if preview of data already appears.
wow.. it works.. :( what was i doing wrong all day..
You must do "1-Click Publish" always when you have a new entity, change something in your entities or when you see the error that appears (in some images that you posted) in middle of the data preview in the aggregate.
After that, data will be previewed in your aggregate.
 

Thanks alot..  its werid... so i have reviewed all i learnt today and i got a a few questions.

1)Can i have more than one Aggregate ?

If yes.... i have repeated the steps taken to get the "Doctor type" to work.. but i have encounted an issue where the tables dont want to be joined.





Now i have reviewed everything... even hit 1-click to publish a few times..... it has no errors.. but the joins dont work
HI Andre,

You don't need any joins on those aggregates. You only want to fecth the DoctorType or the Location so you only need these as Sources of your aggregates.

Another thing you must consider! Once you publish your bootstrap action will execute as you probably saw on the online training video. This means that your data will be bootstraped and the next time it runs (on the next publish) that first aggregate on the bootstrap action will return records from the database and the following If has a guard to make the action stop there when that happens. If you published before you added the Location logic you now need to delete the records from the database in order to bootstrap all the data with all the relationships.

Cheers
oh
First off i must say thank you all for all the support...

but i have created a new application just to test and to understand better... in this one i am using only doctor and Doctor type.. please see below



now it doesnt display the doctor type.. i have repeated the steps i took and reread all the posting.. but i missed something... i know you all are probably annoyed at this point with me.. but i am really trying to get the grasp of this. what did i miss ?? I have 1-click published at every point that i was able to..

so what did i miss ?
Andre,

If helping you annoyed us we wouldn't be here doing nothing ;)

Your code seems to be on the right direction, there's only one thing I notice. On your GetDoctorTypesByName you seem to have 3 sources. That means you are trying to get from the database doctor types that are already set on the doctor entity, which you don't have. So when the code executes the aggregate actually returns nothing from the database.

You have to change that aggregate to only have the DoctorType entity.

Note: Have you tried using the debugger to go step by step seeing what is happening? Set a breakpoint on the beggining of the action, start the debugger in the public area and publish the application for the timer to get executed.

Cheers
ok.. you see why a video or a step by step guide for the new version would help alot.

still haven gotten it working... will keep going throught the steps
Andre, you already did the online training? It would help you a lot!
It's a step by step guide with the most important features to begin to understand how to use OS platform and Service Studio.
i have gone through some of the videos.. not all.

but this should be a simple process of linking 2 entites together .. i have watched the out dated video you have on it and since the process is a bit different ... i got it to work once... but anytime i try to join 2 entities i end back at square 1 with it not working..

so i know i am missing a step or have configured an element wrong.. if someone can point me to where or what i have configured wrong i would understand and not repeat the same mistake.
Andre,

If you'd like to share your module with us I would gladly take a look at it and try to see if you have any issue with it...
i would love to share it.. but it says that i cant share with my subscription.. i am presently on the free model for testing
Export your module using Ctrl+S and attach it here on a post.
please see attached.
Andre,

Here's your module back. What I found:
  • The aggregate, as I explained above, included 3 entities. What you want here is to fetch only the doctor type from the database so you only want to have that entity
  • The filter on the aggregate was comparing city from the excel file with doctortype
I've added a reminder on the module pointing to the issues. You'll see this reminder on the TrueChange™ pane.

Remember, you'll need to delete all the doctors before the bootstrap action runs completely. I've added an action on the homepage to do this.

I hope this makes things clearer and that you are able to move forward. Thanks for keep giving OutSystems Platform a try, I'm sure that once you overcome these hurdles you will have a lot of fun and be able to build amazing apps.

Cheers
thanks would review it and get back to you