Hello,
I have exhausted enough time and effort on this, I need help. I have a SharePoint list for users to request IT setup for new hires at our company. I have security on the list to only allow the users to see what THEY have created, no one else's. I understand there are restrictions with this... so am hoping to use Flow to help, but with there no longer being the "Edit in advanced mode" for Conditions, I feel a bit stuck and lost.
REQUIREMENT: When a new item is created in the list, I'd like Flow to check the existing list to see if the entered "New Hire Name" (text input) already exists (actual column name: New_x0020_Hire_x0020_Name). If it already exists, it'll send an email to the creator that it already exists and we're already on it. If it does not exist, I'll have it send a different set of emails/tasks.
Secondly, I am not sure if it's possible to not even allow a duplicate item to get created if it already exists. I am *not* super concerned with that. I can always go into the list as an admin and clean it up later.
Please help! Thank you in advance.
m
Solved! Go to Solution.
Hi @Morghan ,
You could use Filter Query to filter the item with same New Hire Name in the list.
Then use length() function to calculate the number of items. If it is greater than 0, it means that the item with the same name already exists.
Expression reference:
length(body('Get_items')?['value'])
Image reference:
Hope it helps.
Best Regards,
I believe that your issue can be sovled easily without using Flow for the duplicate entry check.
Doing so will prevent users from entering the same name twice. That said, there is always a chance that the users will enter the names in a slightly different fashion and it will slip through. This would also be true if you were to use a Flow.
Hi @ScottShearer,
I appreciate the quick response. However, that does not work because of the security set on the list. The list has to be open to everyone in order to Enforce Unique Values but I have it intentionally set to have users only see items they have created. If I try, I receive error "This column cannot enforce unique values because this list or document library may contain items that are not viewable by all users."
m
I forgot about that.... Good catch.
I will create a Flow and update this post later tonight that checks for duplicates.
Hi @Morghan ,
You could use Filter Query to filter the item with same New Hire Name in the list.
Then use length() function to calculate the number of items. If it is greater than 0, it means that the item with the same name already exists.
Expression reference:
length(body('Get_items')?['value'])
Image reference:
Hope it helps.
Best Regards,
I discovered last night that this expression is resulting to TRUE even if it's FALSE... I've used a name that definitely does NOT exist in the list, but still resulting in TRUE.... Any ideas?
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.