I have a couple of SharePoint column which via various Flows (or should I say Power Automates!?) get their values appended by a user's display name (e.g. John Doe) and a semi-colon (;).
The SharePoint columns are called 'AddedBy' and 'DeletedBy'.
I want to be able to count the number of occurrences of the current user's display name (separately) in each of the two columns.
I am using User().FullName to get the current user's display name (e.g. John Doe) but I am having trouble counting how many times this occurs in the two columns i.e. 'AddedBy' and 'DeletedBy'.
Let's say I'm logged in as John Doe and the data in the SharePoint list looks like this:
| AddedBy | DeletedBy |
| John Doe; John Doe | John Doe |
I want to be able to count how many times John Doe exists in each column, so I should get the result 2 (AddedBy), 1 (DeletedBy). Happy for the values to be shown via a label if that's easiest.
The reason for this is that once I have the count values, I can say that if the AddedBy count value is greater than the DeletedBy count value, do something else (yet to be determined).
Bit of a strange request but hoping someone can help!