227
Views
6
Comments
Solved
Get Available Room Project
Question

Hi,

     I am doing the Final project of Web Developer Online course. In that project i am working on a button to show the available room and its price. I assigned values and SQL queries. I screen page its showing the result. But after publishing and open in browser i couldn't get the result. Could you help me to solve this issue.

Thanks Dilin

2019-09-24 18-41-25
Jorge Martins
 
MVP
Solution

Hi Dilin

Given that your form shows data, I'd say it is working... maybe in the Room expression you're not using the right attributes? (the ones you assigned at the end of your screen action).

Check if the Expression to display the Room/Price is using the values from the Aggregate instead of the ones from the Form, that could explain the behaviour you are seeing.

2019-09-24 18-41-25
Jorge Martins
 
MVP

Hi Dilin,

When you use a Destination as the end of your action flow, the platform will handle it as if it is the first time it is accessing that screen, so it will reset all local variables (including the Form variables). Consider replacing the Destination tool with a simple End tool.

You may also want to recheck the Screen Lifecycle: Interaction lesson of the Developing OutSystems Web Applications course.

2017-08-26 10-06-58
dilin 1212

Hi Jorge,

  As you told i changed the destination using End tool. But it not works, 

What have to do?

Thank You

Dilin

2026-06-05 12-38-17
Eduardo Jauch

Hi dilin,

The button Get Available Room is set to submit or Ajax Submit? 

While both will not reset local variables, depending on what you have in the preparation you can have problems, as the preparation will be executed again on a submit.

If it is set to submit, try changing it to ajax submit and do an ajax refresh in the expression to update the number and price found in the screen

2019-09-24 18-41-25
Jorge Martins
 
MVP
Solution

Hi Dilin

Given that your form shows data, I'd say it is working... maybe in the Room expression you're not using the right attributes? (the ones you assigned at the end of your screen action).

Check if the Expression to display the Room/Price is using the values from the Aggregate instead of the ones from the Form, that could explain the behaviour you are seeing.

2026-06-05 12-38-17
Eduardo Jauch

Also, I noticed that you are storing the results in the form. The expression is also going there to look for results?

2017-08-26 10-06-58
dilin 1212

Hi, 

 Eduardo and Jorge,

Now its working. Both of your guidance helped to fix it   .  Eduardo, i used 'submit' option and tried, its working. Don't know any error will come in next lessons. But now its fine. I will surely check Ajax refresh method as you told. 

Thank You Both

Dilin   

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