cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aaroh_bits
Helper V
Helper V

Microsoft Form to Power Automate to check Form input validation

Hi PowerAdditcs, 

 

I have a requirement as follows: 

 

  1. Users submit an entry in Microsoft Forms (not Microsoft Forms Pro). 
  2. A user wants to some validation within Forms within their SSN should field must accept only 4 characters in NNNX format. N = Number/digit, X = Alphabet. 

we can connect Forms to Power Automate and perform regular expressions, but if the user has not supplied the correct format as above, is it possible to show to the user on Microsoft Form

Use Case 1: 

  1. User Fills form in Microsoft Form with SSN and other fields. 
  2. Power Automate checks the SSN and if it's correct, its saved entry in SharePoint Online 

Use Case 2

  1. The User Fills form in Microsoft Form with SSN 
  2. Power Automate checks the SSN and if it's incorrect, and goes back to Microsoft Form 
  3. The user is that corrects the SSN  format in Microsoft Form and needs to supply the correct form. 
  4. User correct the SSN,  Power Automate checks the SSN and if it's correct, its saved entry in SharePoint Online 

 

Is this possible to achieve this and approach it will be highly appreciated? 

@yashag2255 @ScottShearer  @efialttes 

 


 

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @aaroh_bits,

 

It is complicated to determine the SSN because Power Automate not support regular expressions. If the SSN isn't correct when user fills the form, there is no way could show to the user immediately, the only way is pass the SSN to Power Automate to process and feedback. Just as @efialttes said, send user a notification and Form link to let user submit it again.

 

And there are my steps of identification to determine the SSN whether correct:

1. Determine length of SSN whether is 4, if it is, goes to step2, if not, send notification;

2. Get the first three characters, use int() function to convert them into a number, if it successful, go to step 3, or send notification;

3. Get the fourth character, determine it if is greaterOrEquals to 'a' and lessOrEquals to 'Z':

and(greaterOrEquals(variables('ForthCharacter'),'a'),lessOrEquals(variables('ForthCharacter'),'Z'))

Annotation 2020-05-28 095158.jpgAnnotation 2020-05-28 095240.jpgAnnotation 2020-05-28 095306.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
efialttes
Super User
Super User

Hi!

"Power Automate checks the SSN and if it's incorrect, and goes back to Microsoft Form "

This is the tricky part. THe integration with forms is one way  but not the other: as a workaround you can design your flow to send an email notification to report him/her the SSN is wrong, and provide a link to the Forms so he/she will need to fill it again.

 

With a questionnaire based on Power Apps or even with Adaptive Cards you can achieve this requirement in a more elegant way

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



v-litu-msft
Community Support
Community Support

Hi @aaroh_bits,

 

It is complicated to determine the SSN because Power Automate not support regular expressions. If the SSN isn't correct when user fills the form, there is no way could show to the user immediately, the only way is pass the SSN to Power Automate to process and feedback. Just as @efialttes said, send user a notification and Form link to let user submit it again.

 

And there are my steps of identification to determine the SSN whether correct:

1. Determine length of SSN whether is 4, if it is, goes to step2, if not, send notification;

2. Get the first three characters, use int() function to convert them into a number, if it successful, go to step 3, or send notification;

3. Get the fourth character, determine it if is greaterOrEquals to 'a' and lessOrEquals to 'Z':

and(greaterOrEquals(variables('ForthCharacter'),'a'),lessOrEquals(variables('ForthCharacter'),'Z'))

Annotation 2020-05-28 095158.jpgAnnotation 2020-05-28 095240.jpgAnnotation 2020-05-28 095306.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@efialttes Thanks for great inputs!

@v-litu-msft thank you much for your sample...

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,075)