Change attribute in the displayed list

How can I insert an attribute where I can change and save the new value directly in the displayed list.
I have an attribute with the name "group", where there are 3 options.
My list is separated by these groups (To Do, Doing, and Done).
I want to place a group of buttons to change the group value for each record shown on the accordions.

Can you help me, please?
Thank you!

Hello Samira.

Please help me understand the logic behind your decision.


Your page groups tasks by that attribute. If it is already in To Do, there is no need to show a "Move to ToDo" button. The same goes for the other groups.


If you are trying to move them to a single list, then you need to show all three together. In that case:


To add a third option, just add one more item to ButtonGroup component.

To save on click, just create an action that saves that value and call it onChange.


No need to refresh the query because the list is showing the value you selected. In faxct, if you do refresh, the "order by"  may change the placement of your task.



I want to be able to update the "group" of "Request" directly in the list:
Change the Request, for example, to change "To Do" to "Doing", to be possible to edit the "Request" and update the other accordions on the list. As well, It is not necessary to open from "Request Details" to change the "group".
I don´t know how to do this, whether it is necessary to add a new input parameter or a new variable and how I relate this data.


Ok.

The Variable you must use on the group is not RequestId, but something like 

GetRequestsToDo.List.Current.Requests.GroupId

The SaveOnClick needs two parameters: RequestId and GroupId (filled with GetRequestsToDo.List.Current.Requests.Id and GetRequestsToDo.List.Current.Requests.GroupId)

Then SaveOnClick calls a Server Action (maybe ChangeRequestGroupId) with the same parameters.

That finds the Request by id, assigns the new GroupId to it, and saves. Server data changing operations should always be done by server actions.


I just changed your logic completely. Was this clear?




Thanks for the help, Nuno!

So, I must create them all with the same parameters:
 - SaveOnClick
 - ChangeRequestGroupId
 - ButtonGroupOnChange

But I was confused about where I list each of them.

Sorry!


samiravolpe wrote:

Thanks for the help, Nuno!

So, I must create them all with the same parameters:
 - SaveOnClick
 - ChangeRequestGroupId
 - ButtonGroupOnChange

But I was confused about where I list each of them.

Sorry!


Could you please share oml file


No.

You only need one Client Action (the ones with white inside). It can Be OnChange or OnClick, the name doesn't matter as long as you understand what it does.

The ChangeRequestGroupId is a Server Action. It goes here.

Then the Client Action calls the Server Action like in my image from before.

Salman Ansari wrote:

samiravolpe wrote:

Thanks for the help, Nuno!

So, I must create them all with the same parameters:
 - SaveOnClick
 - ChangeRequestGroupId
 - ButtonGroupOnChange

But I was confused about where I list each of them.

Sorry!


Could you please share oml file




Nuno Reis wrote:

No.

You only need one Client Action (the ones with white inside). It can Be OnChange or OnClick, the name doesn't matter as long as you understand what it does.

The ChangeRequestGroupId is a Server Action. It goes here.

Then the Client Action calls the Server Action like in my image from before.

I'll see if I can fix the button properties and actions.

Thanks Nuno!


In Summary:


change variables




ChangeRequestGroupId is a Service Action


And client Action calls Server Action.

Then you have some warnings, but I'll let you think about them for a while.