Hi I have created a Entity named "Problem_Description" which have the entity values in the picture attached .
Now Action is of Text type and by default I have not written any things in it . Now, I have created a screen named "MyDashboard_Prob_stat" there I have one aggregate named "GetProblemDescriptions" in which I have included the "Problem_Description" entity and which I have used as form in the "MyDashboard_Prob_stat" screen . Now I have attached a pop up widget in action column which on click is going to ask "whether wanted to approve or reject" on clicking action column value should be approve or reject as per selected.
But Now I am facing a issue that whenever I am clicking any row of action column it is changing value of only first row. How to fix it Please Somebody help me out . I have attached oml file for the reference
Thanks.
Hi Aman, this occurs because, on the OnClick action, you do need to change the order of the assignment.
Try using my solution, and that will run fine, too.
Hi @Aman Shukla, I looked at the OML; the problem is that you are updating the value for current, which is pointing to the first row at all times. What you need to do is create a local screen variable of type "Problem_Description" and on the "OnClick" action, add an input parameter of type "Problem_Description" and inside the "OnClick" action, assign the input value to the local screen variable, and then replace the aggregate reference from the "OnApprove" and "OnReject" actions with the local screen variable. You need to pass the current row as the input of the "OnClick" action, and don't forget to add an aggregate refresh in "OnApprove" and "OnReject".
Hi Aman,
That has to do with your input to your save action, as you are passing the list current record with no context, so the system picks up the first.
I changed the code to upon clicking on the pop-up, to save in the local variable the row you clicked and then update that value, instead.
Take a look to the OML in attachment and to the changes made.
Kind Regards,João
Hi there Aman,
You do need to pass the current row number, or the record to change the value.
If you don't pass these values, then the systems are changing the aleatory record.
I changed your OML to you see my solution. I encapsulated your actions (Approve and Delete) in only one action too. See this too.
Best Regards.
Hi thanks for the solution
I have gone through the solution but it is not working properly . On clicking view a pop up is coming for "approve" or "reject" . But on clicking "approve" or "reject" it is creating a new row with no values in any column except the action column which has value "approve" or "reject" .
Can someone help me in these regards ?
I think the only thing that was missing was to refresh the queries / tables with the updated information, like in the image below and OML in attachment:
You have assigned wrong value in the input of the "OnClick" action, you need to pass this
GetProblemDescriptions.List.Current.Problem_description
and switch the values in the assign inside the action.
Thanks all for the help . It is working now .
Really I am thankful to all you guys .