Hi @Anonymous ,
There may be a few variations, depending on what your 'assignee' column is set to. If it's just a single line of text and you just want to show the name, it's perhaps a little easier than if it's a person or multiperson column.
You can go for Update, UpdateIf or Patch - As an example, let's use Patch and assume the following;
dataSource = Task list which in this example is a SPO List
assigneeColumn = "Assignee" column which is just a single line of text
On your user icon OnSelect: property;
Patch(dataSource, ThisItem, {Status: "Assigned", Assignee: User().FullName})
You may want to also build in some logic to prevent someone doing this for something that is already assigned, in which case on your user icon DisplayMode: property put something like this;
If(ThisItem.Status="Assigned", DisplayMode.Disabled, DisplayMode.Edit)
But that's up to you.
If your Assignee column is a person column in SharePoint, you need to create a SharePoint user object for the current user, then use that to patch. So in your app start, or perhaps just on a button for now to test, set the following;
Set(userSPO,
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|" & Lower(User().Email),
Department:"", DisplayName:User().Email,
Email:User().Email,
JobTitle:".",
Picture:"."
}
)
Then you can set your user icon OnSelect: property to;
Patch(dataSource, ThisItem, {Status: "Assigned", Assignee: userSPO})
Hope this helps,
RT