cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft
Microsoft

Condition check on customString in DevOps

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",...

1 ACCEPTED SOLUTION

Accepted Solutions

I have used this format and it worked.

 

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

View solution in original post

4 REPLIES 4
Community Support
Community Support

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.

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.

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.

I have used this format and it worked.

 

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

View solution in original post

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (5,010)