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
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.
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.
Hi Jorge,
As you told i changed the destination using End tool. But it not works,
What have to do?
Thank You
Dilin
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
Also, I noticed that you are storing the results in the form. The expression is also going there to look for results?
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