A web-based tool in Microsoft 365 that enables users to quickly create surveys, quizzes, polls, and feedback forms.
Dear Rasha Alzayyat,
Thank you for posting your query in our community.
Please don't worry, let's resolve your concern together and move towards a path towards resolution.
To add validation in Microsoft Forms to ensure that the approver's username cannot be the same as the requester's name, you’ll need to use a combination of Microsoft Forms and Power Automate (formerly known as Microsoft Flow). Microsoft Forms by itself doesn’t support complex validations directly, but Power Automate can help you achieve this by automating the process. Here’s how you can set it up:
- Create the Microsoft Form:
Design your form with fields for the requester’s name and the approver’s username.
Ensure you have a field for the requester’s name and a field for the approver’s username.
- Set Up Power Automate Flow:
Go to Power Automate and sign in with your Microsoft 365 account.
Create a new flow and choose "When a new response is submitted" as the trigger. Select your form from the list.
Add a "Get response details" action to retrieve the form responses.
- Add a Condition to Check for Validation:
Add a "Condition" action to check if the approver’s username is equal to the requester’s name.
In the condition, compare the two fields you retrieved from the form (Requester Name and Approver Username).
- Handle Validation Results:
If the condition is true (the approver’s username is the same as the requester’s name), you can take action to handle the invalid submission. For example:
- Send an email notification to the user indicating the issue.
- Send a response back to the form submitter to correct the details.
If the condition is false (the approver’s username is not the same as the requester’s name), you can proceed with the regular workflow or approval process.
- Notify Users of Validation Results:
Use the "Send an email" or other communication actions to notify users of validation results or any necessary corrections.
If you need further assistance please visit our power automate community our power automate community guide your though the process
click here ----->>> Power Automate community (microsoft.com)
If you have any additional questions or if you need any additional help regarding this or anything else at all - let me know, I'll be here to help you out.
And in the meantime, I hope you'll have a lovely day ahead, stay safe & take care!
Yours sincerely,