Trigger condition based on the multi choice column in sharepoint list

Tomasz Kasinski 76 Reputation points
2025-05-21T18:37:40.63+00:00

I struggling to create a trigger condition for a multi-choice column. I tried xpath/json/concat etc. All tricks possible also accounting for empty arrays but anything which seems to work 4-5 years ago now does not. Is there a standard syntax/template for something like below?

Normal conditions after the "When item is created or updated" works perfectly fine (any tricks included like parsing the array of objects into string etc.) however for a performance, it is not viable to run the flow every time the item is updated as it would mean dozens of thousands of flow runs each day and 95% of those flows processing no data, yet running and eating up the log, making any flow errors impossible to diagnose as they will be buried under the tone of empty runs.

So scenario is simple.

When an item is added or modified, check if the multi choice column field_6 contains string 'Advance' and if yes, get that item and do something with it. TLDR, I broke all publicly available AI models asking that question (including Copilot Pro) and no solutions worked. In the end all models started suggesting adding a calculated column to the list (SIC! as we know such column is not even included in a payload!) so I gave up with this so called "AI".

@contains(triggerOutputs()?['body/field_6'], 'Advance')
Microsoft 365 and Office SharePoint Development
0 comments No comments
{count} votes

Accepted answer
  1. Camila Th 1,840 Reputation points Microsoft External Staff Moderator
    2025-05-23T09:36:22.3966667+00:00

    Hi @Tomasz Kasinski

    If you want to use Trigger condition based on the choice column in SharePoint list, you can use both Value and id:

    Here is the example:


    @equals(triggerOutputs()?['body']['field_6']?['Value'],'Advance')

    @equals(triggerOutputs()?['body'][''field_6']?['Id'],3)


    Reference:

    Power Automate: How to trigger a flow only when specific field(s) have certain values - DEV Community

    But if you want to use Trigger condition based on the multi choice column in SharePoint list:

    it seems the best approach is to split the payload of the trigger and then use a choice ID in a simple trigger as you know:


    @contains(triggerBody()?['field_6#Id'],3)


    Hope these information helps.

    Please do let us know if you have any further queries.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Camila Th 1,840 Reputation points Microsoft External Staff Moderator
    2025-05-22T03:45:25.99+00:00

    Hi @Tomasz Kasinski

    Good day! Welcome to Q&A forum.

    From your description, your requirement is when an item is added or modified, check if the multi choice column field_6 contains string 'Advance' and if yes, get that item and do something with it. And don't want to use flow.

    Since you don’t want to use flow, as a suggestion, you can try to use column formatting to achieve your requirement.

    Column formatting in SharePoint Online (JSON formatting) can't directly trigger actions when items are added or modified, but you can do something with items where the multi-choice column contains "Advance".

    About column formatting, here is an article for your reference:

    Use column formatting to customize SharePoint | Microsoft Learn

    Hope these information helps.

    Please do let us know if you have any further queries.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

     


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Tomasz Kasinski 76 Reputation points
    2025-05-22T15:55:08.5+00:00

    I consulted James Williams from the YouTube PowerPlatform channel https://www.youtube.com/@wjameswilliams and it seems the best approach is to split the paylod of the trigger and then use a choice ID in a simple trigger. There are cons of this solution i.e. if the choices are reordered and the index of that particular choice will change the flow would trigger on wrong updates but this can be easy rectified. If somebody knows future proof solution ie to use actual string instead of choice ID, please share.

    @contains(triggerBody()?['field_6#Id'],3)
    
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.