565
Views
20
Comments
Solved
Movie app Assignment 7: Buy Ticket Screen part 7.2  Select Movie Session
Question

got different date result at this assignment, or i am doing wrong? (doing test day for testing because result day got different to from SessionDate expression + 1day), sorry for bad english


Thank you in advance

not match.PNG
2022-05-25 10-40-45
Hugo Duarte
Solution

Hi again Agus,


I think your problem is from your database, i think you are having problems through your data.

2018-04-20 04-21-16
Agus Kukuh Setiaji

Hugo Duarte wrote:

Hi again Agus,


I think your problem is from your database, i think you are having problems through your data.

Hi again Hugo,

it's likely my data and local time pc (from emulated) make this app messed up got + 7 hour (mine UCT +7) after change to uct + 0 and rebuild it got fix.
thanks hugo


UserImage.jpg
df fe

Hi, I have some problems to ask as follows 

- how to change timezone to uct + 0

- after clicking empty seat the color still stay green

-  how to go to my ticket screen after clicking an empty seat 


it's likely my data and local time pc (from emulated) make this app messed up got + 7 hour (mine UCT +7) after change to uct + 0 and rebuild it got fix.
thanks hugo




2018-04-20 04-21-16
Agus Kukuh Setiaji

df fe wrote:

Hi, I have some problems to ask as follows 

- how to change timezone to uct + 0

- after clicking empty seat the color still stay green

-  how to go to my ticket screen after clicking an empty seat 



it's likely my data and local time pc (from emulated) make this app messed up got + 7 hour (mine UCT +7) after change to uct + 0 and rebuild it got fix.
thanks hugo





Hi df fe,

for 1. you can read articel in this https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/OutSystems_Cloud_and_time_zones

in that articel use https://www.outsystems.com/forge/component-overview/500/time-zone


or if just want to test your application it's right just change the local time in your pc (emulator) or smartphone to uct + 0 (i use this way)


or manualy add time when showing in expresion


2. you need make a new attribute (fill with IsFree and value is Ticket.Id = NullIdentifier() . it will make boolean with condition if the ticket not clicked green color(the clicked must have the CreateTicket crud so will have id and make it false and change color to red))in fetch data from database if i not forget it's GetSeatsWithTickets (Seat join with Ticket) with condition join it's Seat.Id = Ticket.SeatId and Ticket.MovieSessionId = SelectedMovieSessionId and the css in icon like this "icon "+If(GetSeatsWithTickets.List.Current.IsFree, "text-green", "text-red") (this will change the icon to green if IsFree = True or red if IsFree = false).


3. you need add destination in last node of buy tikcket server action something like this


UserImage.jpg
df fe

Hi Agus Kukuh Setiaji,

I have tried running your code and a bit confuse about Assign and BuyTicket part. Could you please show configuration of them.


Thank you 


Hi df fe,

for 1. you can read articel in this https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/OutSystems_Cloud_and_time_zones

in that articel use https://www.outsystems.com/forge/component-overview/500/time-zone


or if just want to test your application it's right just change the local time in your pc (emulator) or smartphone to uct + 0 (i use this way)


or manualy add time when showing in expresion


2. you need make a new attribute (fill with IsFree and value is Ticket.Id = NullIdentifier() . it will make boolean with condition if the ticket not clicked green color(the clicked must have the CreateTicket crud so will have id and make it false and change color to red))in fetch data from database if i not forget it's GetSeatsWithTickets (Seat join with Ticket) with condition join it's Seat.Id = Ticket.SeatId and Ticket.MovieSessionId = SelectedMovieSessionId and the css in icon like this "icon "+If(GetSeatsWithTickets.List.Current.IsFree, "text-green", "text-red") (this will change the icon to green if IsFree = True or red if IsFree = false).


3. you need add destination in last node of buy tikcket server action something like this




UserImage.jpg
df fe

Agus Kukuh Setiaji wrote:

df fe wrote:

Hi, I have some problems to ask as follows 

- how to change timezone to uct + 0

- after clicking empty seat the color still stay green

-  how to go to my ticket screen after clicking an empty seat 



it's likely my data and local time pc (from emulated) make this app messed up got + 7 hour (mine UCT +7) after change to uct + 0 and rebuild it got fix.
thanks hugo





Hi df fe,

for 1. you can read articel in this https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/OutSystems_Cloud_and_time_zones

in that articel use https://www.outsystems.com/forge/component-overview/500/time-zone


or if just want to test your application it's right just change the local time in your pc (emulator) or smartphone to uct + 0 (i use this way)


or manualy add time when showing in expresion


2. you need make a new attribute (fill with IsFree and value is Ticket.Id = NullIdentifier() . it will make boolean with condition if the ticket not clicked green color(the clicked must have the CreateTicket crud so will have id and make it false and change color to red))in fetch data from database if i not forget it's GetSeatsWithTickets (Seat join with Ticket) with condition join it's Seat.Id = Ticket.SeatId and Ticket.MovieSessionId = SelectedMovieSessionId and the css in icon like this "icon "+If(GetSeatsWithTickets.List.Current.IsFree, "text-green", "text-red") (this will change the icon to green if IsFree = True or red if IsFree = false).


3. you need add destination in last node of buy tikcket server action something like this



Hi Agus Kukuh Setiaji,

I have tried running your code and a bit confuse about Assign and BuyTicket part. Could you please show configuration of them.


Thank you 



UserImage.jpg
df fe

Hi Agus Kukuh Setiaji,

I have tried running your code and a bit confuse about Assign and BuyTicket part. Could you please show configuration of them.

I have attached the code for you in case you need to see my step

Thank you 


Hi df fe,

for 1. you can read articel in this https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/OutSystems_Cloud_and_time_zones

in that articel use https://www.outsystems.com/forge/component-overview/500/time-zone


or if just want to test your application it's right just change the local time in your pc (emulator) or smartphone to uct + 0 (i use this way)


or manualy add time when showing in expresion


2. you need make a new attribute (fill with IsFree and value is Ticket.Id = NullIdentifier() . it will make boolean with condition if the ticket not clicked green color(the clicked must have the CreateTicket crud so will have id and make it false and change color to red))in fetch data from database if i not forget it's GetSeatsWithTickets (Seat join with Ticket) with condition join it's Seat.Id = Ticket.SeatId and Ticket.MovieSessionId = SelectedMovieSessionId and the css in icon like this "icon "+If(GetSeatsWithTickets.List.Current.IsFree, "text-green", "text-red") (this will change the icon to green if IsFree = True or red if IsFree = false).


3. you need add destination in last node of buy tikcket server action something like this






SeatReservationoutsysdbv3.oml
2018-04-20 04-21-16
Agus Kukuh Setiaji

df fe wrote:


Hi Agus Kukuh Setiaji,

I have tried running your code and a bit confuse about Assign and BuyTicket part. Could you please show configuration of them.

I have attached the code for you in case you need to see my step

Thank you 


Hi df fe,

for 1. you can read articel in this https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/OutSystems_Cloud_and_time_zones

in that articel use https://www.outsystems.com/forge/component-overview/500/time-zone


or if just want to test your application it's right just change the local time in your pc (emulator) or smartphone to uct + 0 (i use this way)


or manualy add time when showing in expresion


2. you need make a new attribute (fill with IsFree and value is Ticket.Id = NullIdentifier() . it will make boolean with condition if the ticket not clicked green color(the clicked must have the CreateTicket crud so will have id and make it false and change color to red))in fetch data from database if i not forget it's GetSeatsWithTickets (Seat join with Ticket) with condition join it's Seat.Id = Ticket.SeatId and Ticket.MovieSessionId = SelectedMovieSessionId and the css in icon like this "icon "+If(GetSeatsWithTickets.List.Current.IsFree, "text-green", "text-red") (this will change the icon to green if IsFree = True or red if IsFree = false).


3. you need add destination in last node of buy tikcket server action something like this








Hi df fe,

sory for late answer, the asign is value you want to save so can have value (id)


and buy ticket it's server action saving the value from parameter you asign before

you can try this way, and don't forget to set css for icon in list so if value null have green color and if red is have id from you click it

2018-04-20 04-21-16
Agus Kukuh Setiaji

and this oml file

Movies_AKS help new.oml
2022-05-25 10-40-45
Hugo Duarte

Hi Agus,


The only thing i'm catching is the 2 filters missing in GetMovieSessionByMovieId:

MovieSession.MovieId = MovieId

and 

MovieSession.CinemaId = CinemaId


2018-04-20 04-21-16
Agus Kukuh Setiaji

Hugo Duarte wrote:

Hi Agus,


The only thing i'm catching is the 2 filters missing in GetMovieSessionByMovieId:

MovieSession.MovieId = MovieId

and 

MovieSession.CinemaId = CinemaId


Hi Hugo,

Still get same error, oh yeah forgot to tell tested all block on click get 1st same date on list and default clock 00.00 am


cap 2.PNG
2022-05-25 10-40-45
Hugo Duarte

Hi again Agus,


In your block SessionsPerDay, change the onclick behaviour that you have from the expression to the list item.




2018-04-20 04-21-16
Agus Kukuh Setiaji

Hugo Duarte wrote:

Hi again Agus,


In your block SessionsPerDay, change the onclick behaviour that you have from the expression to the list item.




Hi again Hugo,


before do that i need create client action? because that ItemOnClick not available, and that ItemOnClick same with OnClick client Action or different??


idk.png
2022-05-25 10-40-45
Hugo Duarte

Hi again Agus,


You already have the client action created, OnClick.

You just need to call it in the item like the image i posted before.

2018-04-20 04-21-16
Agus Kukuh Setiaji

Hugo Duarte wrote:

Hi again Agus,


You already have the client action created, OnClick.

You just need to call it in the item like the image i posted before.

Hi again Hugo,

You mean like oml i attach? still  sessiondate -1 from SessionPerDay and I can't catch any data from SessionPerDay block?


Movies_AKS help.oml
2022-05-25 10-40-45
Hugo Duarte

Hi again Agus,


I'm having a bit of difficulty understanding now the issue, i'll attatch my OML so you can verify by yourself.

Movies.oml
2018-04-20 04-21-16
Agus Kukuh Setiaji

Hugo Duarte wrote:

Hi again Agus,


I'm having a bit of difficulty understanding now the issue, i'll attatch my OML so you can verify by yourself.

Hi again Hugo,

I think your oml have same problem? I tested with date and you have 12 apr 2018 drop item 13 apr 2018?


and this section you need make date session appear too?


2022-05-25 10-40-45
Hugo Duarte
Solution

Hi again Agus,


I think your problem is from your database, i think you are having problems through your data.

2018-04-20 04-21-16
Agus Kukuh Setiaji

Hugo Duarte wrote:

Hi again Agus,


I think your problem is from your database, i think you are having problems through your data.

Hi again Hugo,

it's likely my data and local time pc (from emulated) make this app messed up got + 7 hour (mine UCT +7) after change to uct + 0 and rebuild it got fix.
thanks hugo


UserImage.jpg
df fe

Hi, I have some problems to ask as follows 

- how to change timezone to uct + 0

- after clicking empty seat the color still stay green

-  how to go to my ticket screen after clicking an empty seat 


it's likely my data and local time pc (from emulated) make this app messed up got + 7 hour (mine UCT +7) after change to uct + 0 and rebuild it got fix.
thanks hugo




2018-04-20 04-21-16
Agus Kukuh Setiaji

df fe wrote:

Hi, I have some problems to ask as follows 

- how to change timezone to uct + 0

- after clicking empty seat the color still stay green

-  how to go to my ticket screen after clicking an empty seat 



it's likely my data and local time pc (from emulated) make this app messed up got + 7 hour (mine UCT +7) after change to uct + 0 and rebuild it got fix.
thanks hugo





Hi df fe,

for 1. you can read articel in this https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/OutSystems_Cloud_and_time_zones

in that articel use https://www.outsystems.com/forge/component-overview/500/time-zone


or if just want to test your application it's right just change the local time in your pc (emulator) or smartphone to uct + 0 (i use this way)


or manualy add time when showing in expresion


2. you need make a new attribute (fill with IsFree and value is Ticket.Id = NullIdentifier() . it will make boolean with condition if the ticket not clicked green color(the clicked must have the CreateTicket crud so will have id and make it false and change color to red))in fetch data from database if i not forget it's GetSeatsWithTickets (Seat join with Ticket) with condition join it's Seat.Id = Ticket.SeatId and Ticket.MovieSessionId = SelectedMovieSessionId and the css in icon like this "icon "+If(GetSeatsWithTickets.List.Current.IsFree, "text-green", "text-red") (this will change the icon to green if IsFree = True or red if IsFree = false).


3. you need add destination in last node of buy tikcket server action something like this


UserImage.jpg
df fe

Hi Agus Kukuh Setiaji,

I have tried running your code and a bit confuse about Assign and BuyTicket part. Could you please show configuration of them.


Thank you 


Hi df fe,

for 1. you can read articel in this https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/OutSystems_Cloud_and_time_zones

in that articel use https://www.outsystems.com/forge/component-overview/500/time-zone


or if just want to test your application it's right just change the local time in your pc (emulator) or smartphone to uct + 0 (i use this way)


or manualy add time when showing in expresion


2. you need make a new attribute (fill with IsFree and value is Ticket.Id = NullIdentifier() . it will make boolean with condition if the ticket not clicked green color(the clicked must have the CreateTicket crud so will have id and make it false and change color to red))in fetch data from database if i not forget it's GetSeatsWithTickets (Seat join with Ticket) with condition join it's Seat.Id = Ticket.SeatId and Ticket.MovieSessionId = SelectedMovieSessionId and the css in icon like this "icon "+If(GetSeatsWithTickets.List.Current.IsFree, "text-green", "text-red") (this will change the icon to green if IsFree = True or red if IsFree = false).


3. you need add destination in last node of buy tikcket server action something like this




UserImage.jpg
df fe

Agus Kukuh Setiaji wrote:

df fe wrote:

Hi, I have some problems to ask as follows 

- how to change timezone to uct + 0

- after clicking empty seat the color still stay green

-  how to go to my ticket screen after clicking an empty seat 



it's likely my data and local time pc (from emulated) make this app messed up got + 7 hour (mine UCT +7) after change to uct + 0 and rebuild it got fix.
thanks hugo





Hi df fe,

for 1. you can read articel in this https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/OutSystems_Cloud_and_time_zones

in that articel use https://www.outsystems.com/forge/component-overview/500/time-zone


or if just want to test your application it's right just change the local time in your pc (emulator) or smartphone to uct + 0 (i use this way)


or manualy add time when showing in expresion


2. you need make a new attribute (fill with IsFree and value is Ticket.Id = NullIdentifier() . it will make boolean with condition if the ticket not clicked green color(the clicked must have the CreateTicket crud so will have id and make it false and change color to red))in fetch data from database if i not forget it's GetSeatsWithTickets (Seat join with Ticket) with condition join it's Seat.Id = Ticket.SeatId and Ticket.MovieSessionId = SelectedMovieSessionId and the css in icon like this "icon "+If(GetSeatsWithTickets.List.Current.IsFree, "text-green", "text-red") (this will change the icon to green if IsFree = True or red if IsFree = false).


3. you need add destination in last node of buy tikcket server action something like this



Hi Agus Kukuh Setiaji,

I have tried running your code and a bit confuse about Assign and BuyTicket part. Could you please show configuration of them.


Thank you 



UserImage.jpg
df fe

Hi Agus Kukuh Setiaji,

I have tried running your code and a bit confuse about Assign and BuyTicket part. Could you please show configuration of them.

I have attached the code for you in case you need to see my step

Thank you 


Hi df fe,

for 1. you can read articel in this https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/OutSystems_Cloud_and_time_zones

in that articel use https://www.outsystems.com/forge/component-overview/500/time-zone


or if just want to test your application it's right just change the local time in your pc (emulator) or smartphone to uct + 0 (i use this way)


or manualy add time when showing in expresion


2. you need make a new attribute (fill with IsFree and value is Ticket.Id = NullIdentifier() . it will make boolean with condition if the ticket not clicked green color(the clicked must have the CreateTicket crud so will have id and make it false and change color to red))in fetch data from database if i not forget it's GetSeatsWithTickets (Seat join with Ticket) with condition join it's Seat.Id = Ticket.SeatId and Ticket.MovieSessionId = SelectedMovieSessionId and the css in icon like this "icon "+If(GetSeatsWithTickets.List.Current.IsFree, "text-green", "text-red") (this will change the icon to green if IsFree = True or red if IsFree = false).


3. you need add destination in last node of buy tikcket server action something like this






SeatReservationoutsysdbv3.oml
2018-04-20 04-21-16
Agus Kukuh Setiaji

df fe wrote:


Hi Agus Kukuh Setiaji,

I have tried running your code and a bit confuse about Assign and BuyTicket part. Could you please show configuration of them.

I have attached the code for you in case you need to see my step

Thank you 


Hi df fe,

for 1. you can read articel in this https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/OutSystems_Cloud_and_time_zones

in that articel use https://www.outsystems.com/forge/component-overview/500/time-zone


or if just want to test your application it's right just change the local time in your pc (emulator) or smartphone to uct + 0 (i use this way)


or manualy add time when showing in expresion


2. you need make a new attribute (fill with IsFree and value is Ticket.Id = NullIdentifier() . it will make boolean with condition if the ticket not clicked green color(the clicked must have the CreateTicket crud so will have id and make it false and change color to red))in fetch data from database if i not forget it's GetSeatsWithTickets (Seat join with Ticket) with condition join it's Seat.Id = Ticket.SeatId and Ticket.MovieSessionId = SelectedMovieSessionId and the css in icon like this "icon "+If(GetSeatsWithTickets.List.Current.IsFree, "text-green", "text-red") (this will change the icon to green if IsFree = True or red if IsFree = false).


3. you need add destination in last node of buy tikcket server action something like this








Hi df fe,

sory for late answer, the asign is value you want to save so can have value (id)


and buy ticket it's server action saving the value from parameter you asign before

you can try this way, and don't forget to set css for icon in list so if value null have green color and if red is have id from you click it

2018-04-20 04-21-16
Agus Kukuh Setiaji

Hugo Duarte wrote:

Hi again Agus,


I think your problem is from your database, i think you are having problems through your data.

Hi again Hugo,

both of them use this right? it's ok to delete that and i fetch from assignment again?

can you test my oml if it's same result as you?


Movies_AKS help.oml
2022-05-25 10-40-45
Hugo Duarte

Hi again Agus,


Just tested with your OML and this is the result:



You should import all the data again, as it was in the courses.

2018-04-20 04-21-16
Agus Kukuh Setiaji

Hugo Duarte wrote:

Hi again Agus,


Just tested with your OML and this is the result:



You should import all the data again, as it was in the courses.

Hi again Hugo,

Oh thanks Hugo, I think I made a mistake with course sigh....

I will tested after finish with import Movies Data again, I will tell you if success


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.