Selecting a particular row from list on click event in mobile application

Selecting a particular row from list on click event in mobile application

  

I am trying to get the current selected value from a list where the button is clicked in outsystems mobile application, but its always returning the first row on clicking the button. 

Tried :

List.Current and List[CurrentRownumber] function but didn't work .

Any advice what I am doing wrong?

Thanks 

Is the source of the list the same as the list you are referring to in the button? If you did, and the problem still occurs, could you share the OML?

Kind regards,

Sam.

Sam Rijkers wrote:

Is the source of the list the same as the list you are referring to in the button? If you did, and the problem still occurs, could you share the OML?

Kind regards,

Sam.

Unfortunately I can do that because of Company policies. But I can explain what I am doing.

Currently we have a list variable that contains the list of order that are to be processed by employee. The list is coming from an API. I am using a List Widget to display the order.withing each row I am using a button that displays the order number .On clicking the button I am calling a server action and pass the current order element to it , but now every time its passing the first element of the list .

I have even tried passing the CurrentRowNumber but its always sending the first row number but didn't worked for me.


pranav pandey wrote:

Sam Rijkers wrote:

Is the source of the list the same as the list you are referring to in the button? If you did, and the problem still occurs, could you share the OML?

Kind regards,

Sam.

Unfortunately I can do that because of Company policies. But I can explain what I am doing.

Currently we have a list variable that contains the list of order that are to be processed by employee. The list is coming from an API. I am using a List Widget to display the order.withing each row I am using a button that displays the order number .On clicking the button I am calling a server action and pass the current order element to it , but now every time its passing the first element of the list .

I have even tried passing the CurrentRowNumber but its always sending the first row number but didn't worked for me.


Update :

While clicking the button in the list I am getting the right row number but within the action when I am redirecting to another action method based on some business logic its changing first value.


Solution

Found a simple solution. Instead of passing the current row number to next action,now I am using a local variable to store the row number and using it to get the item from list. It's working for me now. 

Thanks for you help

Solution