web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Pass a blank value to ...
Power Automate
Unanswered

Pass a blank value to a person field in an expression

(1) ShareShare
ReportReport
Posted on by 178

Hello. I have conditions in an expression for a person field but I want to make the false result as blank. 
I've tried the following but still getting the same error (user not found)

 

If(Or(equals(triggerBody()?['Step_Name'], 'ABC Review')),triggerBody()?['Person1']?['Claims'],If(Or(equals(triggerBody()?['Step_Name'], 'DEF Review')), triggerBody()?['Person2']?['Claims'],''))

 

If(Or(equals(triggerBody()?['Step_Name'], 'ABC Review')),triggerBody()?['Person1']?['Claims'],If(Or(equals(triggerBody()?['Step_Name'], 'DEF Review')), triggerBody()?['Person2']?['Claims'],null))

 

If(Or(equals(triggerBody()?['Step_Name'], 'ABC Review')),triggerBody()?['Person1']?['Claims'],If(Or(equals(triggerBody()?['Step_Name'], 'DEF Review')), triggerBody()?['Person2']?['Claims'],-1))

 

Any suggestions?  thank you ahead

Categories:
I have the same question (0)
  • v-litu-msft Profile Picture
    on at

    Hi @lui,

     

    It seems like have some logic error in your expression, the structure of or() function is or(expression1, expression2, ...)

    You can try to test the following expression firstly:

    if(equals(triggerBody()?['Step_Name'], 'DEF Review'), triggerBody()?['Person2']?['Claims'],null)

    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.

     

  • lui Profile Picture
    178 on at

    @v-litu-msft Well right now, i have the following expression and it works fine:

     

    If(Or(equals(triggerBody()?['Step_Name'], 'ABC Review')),triggerBody()?['Person1']?['Claims'],If(Or(equals(triggerBody()?['Step_Name'], 'DEF Review')), triggerBody()?['Person2']?['Claims'],triggerBody()?['Person2']?['Claims']))

     

    I want to replace the false result (in bold) to a blank value. If I replace the bold section with null it doesnt work. What do you suggest?

     

  • v-litu-msft Profile Picture
    on at

    Hi @lui,

     

    Please have a try the following expression:

    If(Or(equals(triggerBody()?['Step_Name'], 'ABC Review')),triggerBody()?['Person1']?['Claims'],If(Or(equals(triggerBody()?['Step_Name'], 'DEF Review')), triggerBody()?['Person2']?['Claims'],if(equals(triggerBody()?['Person2']?['Claims'],null),false)))

     

    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.

  • lui Profile Picture
    178 on at

    @v-litu-msft  entering "false" did not work.  This is the error I keep receiving when i tried null, false, -1

     

    {
    "status": 400,
    "message": "The specified user False could not be found.\r\nclientRequestId: bef4\r\nserviceRequestId: bef"
    }
     
    How do i create a new item with a blank value? 
  • v-litu-msft Profile Picture
    on at

    Hi @lui,

     

    How about using a Blank character: " "?

    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.

  • lui Profile Picture
    178 on at

    I've tried , '') but it doesnt work. Im running out of options! There must be a way to have a blank result when using conditions.

  • Verified answer
    DanyElHoyek Profile Picture
    91 on at

    You can solve the issue by using Send http request to SharePoint to update your item. Please note that using Update Item action will not work in case of Multiple value people field, therefore it is best to use the Send http request to SharePoint when you want to clear the value of a people field.

     

    The method used in the below article will work

    https://jobs.collab365.community/how-to-update-the-sharepoint-people-picker-field-using-power-automate/

     

    In short:

    it is important to mention that when using REST API, the People and Group field will be returned as “FieldNameId”. The format for user field value:
    • single-valued user field: ‘<user field name>Id’ : <user id>
    • multi-valued user field: ‘<user field name>Id’ : { ‘results’: [<array of user ids>] }

      To empty the fields
    • single-valued user field: ‘<user field name>Id’ : -1
    • multi-valued user field: ‘<user field name>Id’ : { ‘results’: [0] }

    You need to get the id of the user as stated in the article and then update you expression accordingly.

    Let me know if you require any details. but it will solve you a lot of trouble to use this method

     

  • Risi Profile Picture
    12 on at

    Looks like I'm a year late replying to this. In Short the right answer is to use "Send http request to SharePoint " the problem with that answer is that it's not sexy compared to using the "Create Item" and "Update Item" actions. 

     

    I did come to a solution that can help some.

     

    In scenarios where the Claims were empty, I would add a conditional Update Item right after creating the item.

    If the Claim wasn't empty I would trigger the update. If it was empty I wouldn't trigger the update.

     

    This is a solution until Microsoft improves the "Create Item" and "Update Item" actions

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard