Search and the results appears in another web page

Search and the results appears in another web page

  

Hi,

I have a StudentsList page and I can search by name of the students and by teachingyear (combobox from teachingyear entity : values : 10º/11º/12º).

What I want is something like... in another webpage, put 3 images or links with the values 10º, 11º and 12º (values of the combobox) and when I press the image or link of the "10º" I am redirected to my StudentsList page and I get only the result of students who are from the "10º".

Can someone help me?

Regards

Clara

Hi Clara,

You can add an input parameter with the teachingyear Id on the StudentList page.
In the other page when you click on the link of the "10º" you set the link to navigate to the StudentList page with the 10º teachingyear Id input parameter.

On the Student Aggregate you have to put the input parameter = teachingyearid.


Hope it was helpfull.


Cheers,

Andreia

Hi Andreia,

Thanks for your solution.
A doubt related to this is when I am in StudentsList page with students list from 10º (10 records) and select one of the students for see the detail in the StudentsDetail page and press the "Cancel" or "Back" button to StudentsList page again, how do I keep the number of records I had on the list of students in the 10º initially, in this case 10 records?


Thanks in advance,

Clara



Hi


Sorry, but still related to this subject, and about Student Name field for search?
In this particular case instead of Student Name is Classification (combobox from classification entity : values : A/B/C/D | LocalVariable:ClassificationId).
I already added an input parameter but not work.

At the moment I have a combobox with the Classifications and 3 images, one for each teaching year.
The 3 images work fine, but Classifications and one of the 3 images not work.


Thanks in advance,
Clara

Hi Clara,

First question: one way to do it would be to carry the TeachingYearId input parameter back and forth between the List and Detail pages. That is, you would also add a TeachingYearId input parameter to your details screen, and pass it the TeachingYearId value of your List screen. Then, on your "Back" action, you pass that same parameter back to the List screen.

Second question: I'm not really sure what is it that you're trying to achieve. Are you trying to also filter the students by ClassificationId? If so, you have to add the ClassificationId input parameter to your List screen and change your aggregate to also filter by this parameter.


Hi Aurelio, Hi Andreia,

Regarding my first question, it is working properly. Thanks to both of you.


About my second question, and answering your question Aurelio, I intend to search by Classification and Teaching Year, (e.g. All Students with Classification = A and Teaching Year = 12º) but in this particular case, the Classification field is a combobox and Teaching Year field is a set of images (3 images, one for each teaching year) with a link.

After these two choices, I am redirected to StudentsList page and I get only the result of students who are from the "12º" with Classification equal to "A".


Regards,

Clara

Hi Clara,


Regarding the first question you can do as Aurelio said and go with the parameter back and forth.Or you can replace the input parameter on the List page for a session variable for each field: one for Session.TeachingYearId and other for the Session.ClassificationId and use it in the aggregate.

About the second question I did not understood what is not working. Can you explain further?


Thanks.


Andreia 


Hi Andreia,

I intend to search by Classification and Teaching Year, (e.g. All Students with Classification = A and Teaching Year = 12º)

My doubt is, how can I pass the value of the Classification combobox plus the Teaching Year image to the StudentsList web page?


Now only works for Teaching Year images.


Have you noticed my doubt?


Hi Clara,

You can simply make your images links and Submit (or Ajax Submit). This way input field data is also sent to the server.

I just whipped up a quick sample module of your scenario with a possible solution: in the "Search" screen we have the Classification combo box, and the Years are implemented as containers with OnClick (which is always Ajax Submit). On the Screen Action that handles the click we simply navigate to the Results screen, passing the two input parameters.

Hope this answers your question.

Solution

Hi Clara, 


I send you attached another example on how to do it, and for you not to loose the search inputs as I told you before with the session variables. Also put the classification on the combo box for you to see a way on how to do it.

Hope it helps you in your work. 


If you need something else just say it.


Cheers,

Andreia




Solution


Hi Andreia, Hi Aurelio, Hi Jorge,


Thanks for your help and for your examples.

Thank you.


Regards,

Clara

p.s. The example from Jorge it works too