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. ]

View solution in original post

AgileGrrrrrg
Frequent Visitor

Worked like a charm, Cheers : )

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,756)