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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,063)