31
Views
3
Comments
Data Action value miss match
Application Type
Mobile

Hi All

i have a question about get data by id using fetch data action. how do I get data that is not current, but selected data? when i press the button from "UR/TE/IT/2207/0061" why always get the current data, please let me know how to fix this problem, thanks a lot

regards,

yansen


TicketingApps_v935.oml
2022-01-13 08-29-52
Saravanan Santhanam

Hi @yosua yansen 

For the mentioned scenario, You need to pass the Ticket Id as (PageData.Current.Trx_ticket_h_id) since PageData is the source for the list element. Instead, your passing (GetTicketWaitingApproval.ticket_h_id) from data action which always gives you the same result as Id's not going to change. Attaching the OML, pls verify.

Hope this helps!

Regards

Saravanan Santhanam.

TicketingApps_v935.oml
UserImage.jpg
yosua yansen

Hi @Saravanan S 

thanks for your response, i already doing same the result still same 

2021-03-25 06-15-00
Meetali Gupta

Hi @yosua yansen ,


Can you please confirm what you need to show on the second screen on which you are navigated after clicking on Approve button.


There are two scenarios:

  1. You only need to show the data of the ticket for which you have clicked the approved button -For this instead of having a list on screen, you only need to use a container on the screen to show all the details of the selected ticket. This can be achieved by filtering the output of GetListApprovalTicket by Ticket Id so that you only get the data of that particular ticket.
  2. You need to show the data of all the tickets you have not approved yet- This is the scenario which is currently implemented in your code but the issue is in GetTicketWaitingApprovalOnAfterFetch action where you are using ListAppend(which will append only the current element of GetTicketWaitingApproval List to TicketApprovalById List due to which it is showing the first element always. So here instead of using listappend, you need to use ListAppendAll which will append all the elements of   GetTicketWaitingApproval  list in TicketApprovalById List.

Attaching the OML file with the updated logic of list append.

Hope this helps you!!


TicketingApps_v935_updated.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.