Former Business Analyst Needing Assistance or Mentor

Former Business Analyst Needing Assistance or Mentor

  

I will preface this by saying I have completed the Web Developer Training course and have spent countless hours searching the site/forums/related YouTube videos. In my prior life I was a business analyst for several years. While this has made me comfortable with concepts and basic functions, I definitely have some gaps.

The concepts and basic scaffolding of this application are working for me just as expected. Basic forms and such are working too. My struggle is when I'm trying to complete a form or table using 2 separate entities. I'm assuming it's something simple like a join I'm missing, but I've tried many different things and still can't get the accurate result. I either only see one entities worth of data at a time, or if i do get both, it's mismatched ( Example for record 1 I see Entity A information for Row 1, but Entity B I may see row 10 data). Not sure how to keep it in sync.

I apologize again as this is surely a basic concept. Even if you have documentation or videos I can watch that would be incredible. These 2 tables are the foundation for almost every function of the application so it is vital that I set this up properly.

Thank you in advance. 

Hello Brittany, 

       I honestly didn't get what you mean exactly, but I think its the issue is in the join type if you are making Aggregate action you just need to check the ID that the relation depends on. 

If you share a photo for the Aggregate will help more.

Best Regards, 

Mohamed Al Mokadem

Since I already have some actual customer data I will try to first explain without a screenshot. I have restarted and here are the steps I've completed:

1) Uploaded Spreadsheet to create Entities. There is a "ProjectInformation" Entity and "SiteInformation" Entity (and a few others not in consideration yet).

2) Using Scaffolding I have created a "Project Information" Screen (Browse/Lookup) and  Project Create screen.

3) For both screens mentioned in step 2, I need to pull in the data from both the "ProjectInformation" Entity and the "SiteInformation" Entity.

For my aggregate I have 2 sources: ProjectInformation and Site Information

Join: ProjectInformation.SiteInformationID = SiteInformation.Id  (As I have set up the SiteInformationID as a FK on the Project Information entity.

Depending on my with/without selection I either see ONLY the ProjectInformation data or the SiteInformation data. not both together.

Again, I apologize as I know this is a basic question. 

Usually, the with/without difference is seeing nothing and seeing too much :)

This case really needs an example. Just make a 2 rows example with dummy data.

Added some test data. Now seeing the newly inserted rows, I see the issue is probably because the ProjectInformation.SiteInformation.id is not populated. I bootstrapped all the data however, and would like to see it synced up in the order it was imported. As you can see on rows 3-4 Site information is populated however ProjectInformation is blank. 

There are two options.


  • ProjectInformation has SiteName?

When loading Project you need to do a search for the Site Name to get the SiteId.


  • ProjectInformation has SiteId?

SiteId must be non-auto-number. Otherwise it will just be a integer, not the Identifier.

Nuno,

That is probably what I'm missing as I only have the Site Entity ID as a FK on the Project Information entity. I actually think if I was going to research/utilize an item from the SiteInformation Entity it should probably FA Code (column highlighted in the screenshot above).

So you are saying that in the form they would need to select the appropriate FA code and then the rest of the Site Information would be pulled in based off that code?

I just said how you should bootstrap data. That was your point 1 and the first place where it could be wrong.

I don't see the screenshot, but yes. ProjectInformation table has the SiteId and aggregate should return the right row. One query with both tables and just one row.

Solution

Hello Brittany,

First, SiteInformation is your "left" table in your "left join". So, unless you have a filter that change the result, you will see in your aggregate all sites, no matter there are projects that point to it (through the FK), where some of the lines will have both info (when the id is defined in the fk), and some where only site information is present (no project pointing to the site).

You can try to fix this in the bootstrap, using a lookup table like suggested by Nuno, but if you have sites without projects pointing to it, your aggregate will continue to provide sites without projects.

If you wants only projects with sites, or sites with projects, change to inner join.

Cheers.

Solution

Thank you both. I have been able to link the data together successfully now. Appreciate your time. :)