Movie app assignment 7.5: Display tickets

Movie app assignment 7.5: Display tickets

  

Hi,

I have a problem with displaying tickets on My tickets Screen. When I press on a selected seat, I'm redirected on  My Tickets screen, and it shows only data and time, but not selected ones. Movie Title, Cinema Name, and Seat are absent. I fetched GetMoviesWithCinemas, GetSeatsWithTickets, GetMovieSessionByMovieId. I also added MovieId, CinemaId Input Parameters, and SelectedMovieSessionId Local Variable. Cannot get what I've missed. Please find my Module attached. 

Thanks.

Hi Julie,

In GetSeatsWithTickets, you use SelectedMovieSessionId in the Join Condition. However, since the Aggregate is executed asynchronously when the Screen starts, at that point the SelectedMovieSessionId is empty, so the Join will always fail.

Hi Julie


Indeed, you're never setting the "selectedSessionId" variable. I believe that should be set up as an input parameter, and passed from the seats block. It would be the same parameter the block is getting as an input.


Hope this helps!

  CLSJ

Processing Upload...

Carlos López Santibáñez Jácome wrote:

Hi Julie


Indeed, you're never setting the "selectedSessionId" variable. I believe that should be set up as an input parameter, and passed from the seats block. It would be the same parameter the block is getting as an input.


Hope this helps!

  CLSJ

Hi:)

I think I didn't get it well. I've followed your recommendations but unfortunately, have the same result. 


Solution

Hi Julia


I just took a better look at your screen. What you're trying to do is show all the user tickets right? 

In that case you don't need any input parameters, you need to query the ticket table filtered by user Id. Join with Seat, MovieSession and Movie to get all the data that you need to display.

Additionally, you're not displaying the content as a list, so the user would only have seen one ticket regardless if the user had several tickets or just one. I have attached an OML exemplifying this (though of course have not tested it).


Hope this helps!

  CLSJ

Solution

Carlos López Santibáñez Jácome wrote:

Hi Julia


I just took a better look at your screen. What you're trying to do is show all the user tickets right? 

In that case you don't need any input parameters, you need to query the ticket table filtered by user Id. Join with Seat, MovieSession and Movie to get all the data that you need to display.

Additionally, you're not displaying the content as a list, so the user would only have seen one ticket regardless if the user had several tickets or just one. I have attached an OML exemplifying this (though of course have not tested it).


Hope this helps!

  CLSJ

Oh, now I see. Thank you a lot, Carlos!