Can I invoke a next record for an agregate in an action ?

Can I invoke a next record for an agregate in an action ?

In doing this for O11 Mobile.

Hi Jose,

Yes you can,.

But can you explain waht you want achive?

case 1.When you get data from aggregate. and if aggregate return data you can loop  over aggregate and find record accordingly.

case 2.you can get only one record from aggregate set max record 1 and set order by in aggregare


Reagrds

Rahul Sahu

Rahul Sahu wrote:

Hi Jose,

Yes you can,.

But can you explain waht you want achive?

case 1.When you get data from aggregate. and if aggregate return data you can loop  over aggregate and find record accordingly.

case 2.you can get only one record from aggregate set max record 1 and set order by in aggregare


Reagrds

Rahul Sahu

I'm trying to create a quiz with questions and answers and when the user clicks the link of the correct answers it triggers an action and in that action i wolud like to do a next record and refresh the page.



Jose Nepomuceno wrote:

Rahul Sahu wrote:

Hi Jose,

Yes you can,.

But can you explain waht you want achive?

case 1.When you get data from aggregate. and if aggregate return data you can loop  over aggregate and find record accordingly.

case 2.you can get only one record from aggregate set max record 1 and set order by in aggregare


Reagrds

Rahul Sahu

I'm trying to create a quiz with questions and answers and when the user clicks the link of the correct answers it triggers an action and in that action i wolud like to do a next record and refresh the page.



Hi Jose,

It looks like when the user will click on the correct answer, only in that case you have to move for the next record. Here Rahul's case 1 can work. just use if condition in the loop and bind the next record with a list variable (you can use list append also) and then bind the result of append list with list record with refresh data and ajax refresh on container of list record.
So, when ever user will click on the answer, it will check the answer in aggregate, if answer is correct then your list variable will bind with next record else not.

Regards,

Himanshu