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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Building an array howe...
Copilot Studio
Unanswered

Building an array however not selecting the values that are null

(0) ShareShare
ReportReport
Posted on by 50

Here is my flow and it works great.  It's an global address book for our team bot.  Use if you want however the o365 address book has multiple users that I don't want to get in the array.  Example:

 

so my search term in this example is 'joe'.   I want to exclude anything that has nothing (like "Joe Charlie (O365 Admin)") - if the account don't have an email then I want to exclude them all together and if I can exclude a single value like "Joe Beta" phone because it's null on the O365 address book..  I am having issues trying to do that, any thoughts?  

 

 

joe alpha (jalpha)
 - joe_alpha@domain.com
 - city
 - [111.222.3333]
 - 01.01 headquarters

joe beta (jbeta)
 - joe_beta@domain.com
 - city
 - []
 - 01.02 headquarters

joe charlie (O365 Admin) (joe_charlie)
 - 
 - 
 - []
 - 

joe charlie (jcharlie)
 - joe_charlie@domain.com
 - city
 - [111.222.5555]
 - 01.03 headquarters

 

 

 

 

FirstFirstSecondSecond

 

Here the concatenate from the array to a string, if you want to recreate it:

 

concat('##### ',body('Get_user_profile_(V2)')?['displayName'],' (',body('Get_user_profile_(V2)')?['mailNickname'],')',variables('newLine'),'- ',body('Get_user_profile_(V2)')?['mail'], variables('newLine'),'- ',body('Get_user_profile_(V2)')?['city'],variables('newLine'),'- ',body('Get_user_profile_(V2)')?['businessPhones'],variables('newLine'),'- ',body('Get_user_profile_(V2)')?['officeLocation'],variables('newLine'),variables('newLine'),variables('newLine'))

 

 

I have the same question (0)
  • k1ng Profile Picture
    50 on at

    Any ideas?  basically I want to have an if then statement but I am but sure how do that with the array 

  • Pstork1 Profile Picture
    69,039 Most Valuable Professional on at

    Take a look at the Data Filter Array action.  It provides a condition statement that can be applied to each record to filter rows out of an array.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 410

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 160 Super User 2026 Season 1

#3
chiaraalina Profile Picture

chiaraalina 63 Super User 2026 Season 1

Last 30 days Overall leaderboard