Hello Everyone,
Problem 1: I am trying to display the list of random questions with their options just like any online exam with multiple answers questions. It was working well with data action(Generates random records) but when I added pagination to it the complete list was getting refreshed every time whenever a user wants to navigate to any questions on the screen i.e. suppose there are 10 questions in the database and we are getting any 5 random questions in the list. If a user wants to navigate to any question via pagination, pagination calls the client action and inside client action the data action is getting called which generates random records and the whole list is getting refreshed again, so the user is getting a list of new random questions every time he navigates. I want to implement some logic that doesn't allow the data action to get refreshed again.
Problem 2:
So I implemented a second new Data Action which will only return the list even if i.e. first Data Action will only generate a list of random questions and the second Data Action will get refreshed (for the next question) every time user navigates it through. But another problem is facing that I am not able to debug my code. I don't know what is the problem and in other applications when I debug It creates a lot of threads(4-5 threads) and when I hit continue It keeps on jumping from one thread to another thread, also sometimes it stops debugging in the middle of flow. In this application I am getting this error, even though I have marked the screen1 as Default.
Sure, Here it is.
Thank YouShubham
Lets start with problem 2: debugging.
your error says you don't have a default entry. In Reactive you must have 1 screen that is default (Mark as default).
If you are debugging from another module, that doesnot contain a screen, you need to set the starting module before debugging.
Now your first problem.
You need to keep your list of generated questions, but if you go to another form and return to your list, it will do a new data retrieval.
To save your list of questions i would build something. you can save the generated list in a table with a session or something. then you can pass that session id to both screens. The list screen will get the list from the session and show the same questions again.
Thank you for your response but there are no dependencies(other than Outsystems itself) as such as you can see in the .oml file I have uploaded.Asking for the session I have no idea how to manage it in the Reactive application.Thank you again
So, if there are no dependencies, you haven't selected a Default screen (image 1).
Reactive does not have session variables like traditional. But you can create your own entity, having a guid, user id and datetimecreated.
You need to clean up that entity yourself (timer?).
Bottomline is that you have to save your generated questionlist if you want to use it multiple times.
You can also build all logic in 1 screen (list and detail) and show either the list or the detail.
Thank You @Stefano Valente Actually, it is a laptop problem debugging is working fine in my other system but not in the current laptop. Now I am able to debug the flow, also I designed the logic(thanks to debugging) that I wanted to implement.Thank you for your response
Shubham Mishra
I am glad to hear you solved the problem.
It sounds a bit odd that this default entry error was due to your laptop...
Anyway: please post the solution and mark as answer so others can benefit from your solved issue.