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

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
    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
    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

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard