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 / Power Automate / Using If function to U...
Power Automate
Answered

Using If function to Update Sharepoint Item

(0) ShareShare
ReportReport
Posted on by 2
I have a sharepoint list with a column for countries (drop-down multi-select choice) and number of countries (numbers).
So far I have been able to auto-populate # of countries based on the "Update Item" flow by inserting a length function and the dynamic content for the countries column
 
length(triggerbody()?['countries'])
 
Countries # of countries
Angola 1
Argentina, Brunei 2
Group (All countries) 67
 
But I want to return a value 67 if "Group (All countries)" is selected.
I tried inserting an If function but it is not working for me. It is always giving me the false case which is the same formula above.
 
if(contains(triggerbody()?['countries'],'Group'),'67',length(triggerbody()?['countries']))
 
How can I get this formula working?
Categories:
  • Verified answer
    Srini007 Profile Picture
    3,490 Super User 2026 Season 1 on at
    Hi,
     
    Can you try as below and let know if this is working
     
    if(contains(join(triggerbody()?['countries'], ','), 'Group (All countries)'), '67', length(triggerbody()?['countries']))
     
    If I have answered your question, please mark it as the Answered. If you like my response, please give it a Like.
     
    Regards,
    Srini

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard