Force String Formats and Check content MS Forms

New Contributor

My problem is two fold,


I need to force my users to enter a time format, HH:MM in a text box that requests the time.


I also need to be able to alert my users that the email they entered was not formatted correctly (as an email) AND if they have entered the wrong email (not their MS 365 email) that they need to enter the correct one.


Ideally I wanted to do this operation in Power Automate somehow, but it appears I can only really manipulate what happens after the data can no longer be modified in the Form. In addition, this also shifts the burden of data validation onto me to correct any erroneous email addresses that were entered.


The Flow connected to this Form needs to fire every time a new response is submitted, but it can't complete the Flow if the email address is invalid. Also, the time result looks funky if the user doesn't enter their time in an HH:MM format.


Any guidance is deeply appreciated.



3 Replies
best response confirmed by Jakson_Rakoy (New Contributor)

@Jakson_Rakoy if your users are all internal (and therefore you've switched on the "Only people in my organisation can respond" setting) then you don't need to ask them for their email address because Forms & Office 365 know who they are. So the email address will always be correct and can be used in a flow.


If your users are potentially external and you have the "anyone with a link can respond" setting then there is no way you can stop users entering incorrect email addresses. There is no "prevent numptiness" setting.


A flow can only trigger when the response is submitted so you can't go back and ask the users to change anything they have entered.


In your form you can't force the way HH:MM is entered as, bizarrely, there is no time question type or date and time question type. In a flow you could get it to change hh:mm to HH:MM but it would be difficult to trap every possible combination of how a user could enter a time.


Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

Thank you very much for your guidance, Rob.
I'll reconsider including the email field at all in my form. I was recently suggested using the Get User Profile method in my Flow to accomplish what you mentioned about getting the submitter's email information.

@Jakson_Rakoy you can use the get User Profile action to get lots of info about the user, for example we use it to personalise emails. We also use it because otherwise at our company the Responders Email is in the format rather than the user's name @.... So we always add the Get User Profile and then select Mail from the dynamic content box. But you don't have to use the Get user profile action; you can just select Responder's Email from the dynamic content box.


Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)