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 / Condition check on cus...
Power Automate
Answered

Condition check on customString in DevOps

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I am creating a flow which needs to send email if ComplianceTag value is found in the Microsoft_VSTS_Common_CustomString09 field for a work item in DevOps.

 

I added a condition control, which check "Body" contains "ComplianceTag". This is not working. Can someone help how to add this condition.

 

..."Microsoft_VSTS_Common_CustomString08":"testing","Microsoft_VSTS_Common_CustomString09":"ComplianceTag",...

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

    Hi @kryalava,

     

    Contains function and condition action are check whether a collection has a specific item. Return true when the item is found, or return false when not found. This function is case-sensitive.

    Specifically, this function works on these collection types:

    • A string to find a substring
    • An array to find a value
    • A dictionary to find a key

    "Body" is a subject, so contains not work, you should put a string into it, for example:

    body('Get_work_item_details')?['Microsoft_VSTS_Common_CustomString09']

     

    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.

  • kryalava Profile Picture
    Microsoft Employee on at

    Hi @v-litu-msft 

     

    Thanks for your reply. I tried using this solution but did not work.

     

    I created 3 new variables with 3 different values.

     

    Name: CustomString09
    Type: String
    Value: body('Get_work_item_details')?['Microsoft_VSTS_Common_CustomString09']

     

    Name: cs09
    Type: String
    Value: body('Get_work_item_details')

     

    Name: cs08
    Type: String
    Value: body['Microsoft_VSTS_Common_CustomString09']

     

    None of these have the value that I assigned in the customstring09 field of the work item. The value that I assigned in the customstring09 is simple string value tag1.

     

    Can you pls help.

    @v-bacao-msft Any suggestions will help me a lot.

  • v-litu-msft Profile Picture
    Microsoft Employee on at

    Hi @kryalava,

     

    Could you share an instance of the work item?

    Please shield personal information.

     

    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.

  • Verified answer
    kryalava Profile Picture
    Microsoft Employee on at

    I have used this format and it worked.

     

    string(triggerOutputs()?['body/fields/Microsoft_VSTS_Common_CustomString09'])

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 573

#2
Valantis Profile Picture

Valantis 407

#3
11manish Profile Picture

11manish 387

Last 30 days Overall leaderboard