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 / Action 'Update_a_work_...
Power Automate
Suggested Answer

Action 'Update_a_work_item' failed

(0) ShareShare
ReportReport
Posted on by
Hi all,
 
I'm trying to update a work item in Azure based on approval within my flow. Once approved, I'm trying to update a free text field (ReadyforInvoicing_TXT) with 'Yes'. I'm getting the below error. Can anyone please recommend a solution to fix this? Thanks
 
Unable to process template language expressions in action 'Update_a_work_item' inputs at line '0' and column '0': 'Unable to evaluate template language expression '@triggerOutputs()?['body/fields/Custom_ReadyforInvoicing_TXT']' as JSON property name: the expression value of type 'Null' could not be used as property name.'.
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Ninjasabi Profile Picture
    122 on at

    The error you're encountering occurs because the field Custom_ReadyforInvoicing_TXT is either null or does not exist in the work item you are trying to update. Power Automate cannot evaluate a null value or a non-existent field as part of its input.

    Here’s how you can resolve and troubleshoot the issue:


    Solution 1: Validate if the Field Exists

    1. Check the Work Item in Azure DevOps:

      • Navigate to the specific work item type in Azure DevOps.
      • Verify that the field Custom_ReadyforInvoicing_TXT exists and is correctly spelled.
      • Ensure the field is available for the work item type you're trying to update (e.g., Bug, Task, or User Story).
    2. Use "Get Work Item" to Inspect the Fields:

      • Add a "Get a work item" action before the update step in your flow.
      • Output the fields of the work item to a Compose action:
        outputs('Get_a_work_item')?['fields']
      • Review the output in the flow run history to ensure the field Custom_ReadyforInvoicing_TXT exists.

    Solution 2: Add a Null Check in the Update Step

    If the field exists but may not always have a value, use a condition or a fallback value to handle null scenarios.

    1. Condition Before Updating:

      • Add a condition step to check if the field is null:
        • Expression:
          not(equals(triggerOutputs()?['body/fields/Custom_ReadyforInvoicing_TXT'], null))
        • If true: Proceed to update the work item.
        • If false: Skip the update or handle it differently.
    2. Use a Default Value for the Field:

      • Update the field using a default value when it's null:
        • In the "Update a work item" action, modify the field value using this expression:
          coalesce(triggerOutputs()?['body/fields/Custom_ReadyforInvoicing_TXT'], 'DefaultValue')
        • Replace 'DefaultValue' with a string like 'Yes'.

    Solution 3: Correctly Reference the Field in the Update Action

    1. Ensure the Field Reference Matches the API Format:

      • Azure DevOps custom fields often use the format:
        Custom.<FieldName>
      • Verify if the correct reference for the field is fields/Custom.ReadyforInvoicing_TXT.
    2. Manually Add the Field Key and Value:

      • In the "Update a work item" action, use:
        • Key: Custom.ReadyforInvoicing_TXT (or the correct reference format).
        • Value: Yes.

    Solution 4: Handle Missing Fields Gracefully

    If the field doesn't exist in certain work item types, handle it conditionally:

    1. Check Work Item Type:

      • Add a Condition step to verify the work item type before updating:
        • Expression:
          equals(triggerOutputs()?['body/fields/System.WorkItemType'], 'SpecificType')
        • Only update if the work item type is correct.
    2. Log Missing Fields:

      • If the field doesn’t exist, use a Compose or Send an email action to log the issue.

    Next Steps

    • Run the flow with the above modifications and check the outputs of the "Get a work item" step to verify the field reference.
    • Confirm that the field is not null before passing it to the update step.
    • Use coalesce or a condition to handle null values gracefully.

    Let me know if you need further assistance or help debugging your flow!

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 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard