cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AgileGrrrrrg
Frequent Visitor

Creating AD user from Forms. Empty answers problem.

I want new user to be created via Microsoft forms. Not all of the properties are mandatory to fill out. Like phone number for example. If the tile is left empty i get this error:

"Invalid value specified for property 'mobilePhone' of resource 'User'.",
    "details": [
      {
        "target""mobilePhone",
        "code""InvalidLength"
      }
 
I searched forum but cant find the solution.
 
1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @AgileGrrrrrg ,

you can try using the if(...) expression on the optional columns.

if(condition, ifConditionTrue, ifConditionFalse)

In your situation you want to check if the input from MS Forms is empty. If true, if it's empty, use the null value, if it's not empty, use the actual value from the MS Forms.

if(empty([dynamicContentFromMSForms]), null, [dynamicContentFromMSForms])

Note:
[dynamicContentFromMSForms] is a placeholder, replace it with the dynamic content from the MS Forms!


[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

2 REPLIES 2
tom_riha
Super User
Super User

Hello @AgileGrrrrrg ,

you can try using the if(...) expression on the optional columns.

if(condition, ifConditionTrue, ifConditionFalse)

In your situation you want to check if the input from MS Forms is empty. If true, if it's empty, use the null value, if it's not empty, use the actual value from the MS Forms.

if(empty([dynamicContentFromMSForms]), null, [dynamicContentFromMSForms])

Note:
[dynamicContentFromMSForms] is a placeholder, replace it with the dynamic content from the MS Forms!


[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
AgileGrrrrrg
Frequent Visitor

Worked like a charm, Cheers : )

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,903)