Hi @shaikbashu786 ,
Could you please share a bit more about your scenario?
Do you want to remove yourself from the "Site Admin" column in an item when you press the "Remove Site Admin" button?
Further, have you enabled "Allow multiple selections" option for "Site Admin" column in your SP List?
I have made a test on my side, please consider take a try with the following workaround:
Firstly, please turn on the "Formula-level error management" option within Advanced settings of App settings of your app.
1. If you have enabled "Allow multiple selections" option for "Site Admin" column in your SP List:
Set the OnSelect property of the "Remove Site Admin" button to following:
Set(ExistingUsers, SharePointIntegration.Selected.'Site Admin');
Patch(
'Your SP List',
SharePointIntegration.Selected,
{
'Site Admin': Blank()
}
);
Patch(
'Your SP List',
SharePointIntegration.Selected,
{
'Site Admin': Filter(ExistingUsers, Email <> User().Email)
}
)
2. If you do not enable "Allow multiple selections" option for "Site Admin" column in your SP List (clear the "Site Admin" column):
If(
SharePointIntegration.Selected.'Site Admin'.Email = User().Email,
Patch(
'Your SP List',
SharePointIntegration.Selected,
{
'Site Admin': Blank()
}
)
)
Note: The 2nd condition is used to clear 'Site Admin' column value if the 'Site Admin' column value is current login user.
Please consider take a try with above solution, check if the issue is solved.
Best regards,