[Super Placeholder] How to add input parameters to the SQL node

[Super Placeholder] How to add input parameters to the SQL node

  
Forge Component
(7)
Published on 2016-10-21 by Justin Babel
7 votes
Published on 2016-10-21 by Justin Babel

Hello


I'm studying developing outsystems Web applications with this link.

https://www.outsystems.com/learn/courses/15/developing-outsystems-web-applications/

From final project 'Booking Assignment', I don't know how to do this part.

At new booking screen, when I click 'Get Available Room' button, then new screen should be displayed
and cheapest room should show...

How to handle input parameters and variables between 'new booking' screen and 'get available room' screen?



if I click 'Get Available Room' button with filling in some value, then it doesn't look like the parameters are passed properly..
all parameters are just default value..
 
https://jiyoun-jung.outsystemscloud.com/Bookings_JYJUNG/GetAvailableRoom.aspx?NumberOfAdults=0&CheckOutDate=1900-01-01&CheckInDate=1900-01-01&NumberOfChildren=0&(Not.Licensed.For.Production)=



From the top fo my memory (as I didn't this in some time)...

You are defining the parameters to make the search (like the checkin date and checkout date) in the new booking page. You have to pass this information (as input parameters, for example), in the link to the Available Room page, and use them in the sql query that will look for the room.

So, you need to create the input parameters in the Available Room page and set the Mandatory property to Trye, so you know if there is any link to this page that is missing sending the values.

Two things to check, if the link to this page is using the correct values (probably the values in the record of the form of the new booking page), and if your query is working (you can set test values and test it to see if it return a room).


Cheers,

Eduardo



P.S.

I noticed in the link you send, that you are not sending the parameters correctly. 

Be sure that in the button to get available room you are setting the valus using the record from the form.

Jauch wrote:

P.S.

I noticed in the link you send, that you are not sending the parameters correctly. 

Be sure that in the button to get available room you are setting the valus using the record from the form.


Thanks for your answer.

I think I created input parameters in 'get available room' screen.

From 'Booking detail' screen, 

'Get available room' button, how to use the values in the record of the form of the new booking page?

Is below wrong? 

Ok.

I think the way you are doing will not work.
The problem is that your button is set to "navigate".

When you enter the "new booking" screen, after the preparation, when the page is being rendered, the values for the parameters will be used from whatever is the source that, at this point, they are all "null".

When you click, because of the navigation, you will use those values to pass to the other screen.

So, this is not what the exercise is looking for.

If you look to the exercise, you will see that in the "new booking page" there is a last line in the mock up screen (in PDF) that shows the number of the room available. Of course it will be empty when you enter this screen, but the idea of the exercise is that when you click the "Get Available Room" you will call an SCREEN ACTION (with Ajax Submit), do the query, store the room id and after that refresh only that line in the screen.

This way you don't have to leave the screen.