web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Null in Key Value

(0) ShareShare
ReportReport
Posted on by

Why can a key value in Update a row not be blank? The error always says that the value cannot be equal to null and I was wondering if there is any kind of workaround with this? Is there a way to use expressions that will allow me to reference a blank cell in excel and then update a blank cell to a new value?

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,979 Most Valuable Professional on at

    Hi @Noah100 

     

    To update an existing record you need a unique identifier otherwise you won't be able to update that record at all. Its a standard across the industry for any databases or excel sheet.  Without passing a key you won't be able to update any record.

     

    Thanks

  • Resolutions Profile Picture
    125 on at

    @Noah100 In the "Update a row" action of Power Automate (formerly known as Microsoft Flow), certain fields are designated as "key fields" when working with Excel tables. Key fields are columns that uniquely identify each row in the Excel table. When updating a row, you are required to provide values for these key fields, and they cannot be left blank or set to null. The reason for this requirement is that the key fields are used to locate the specific row that needs to be updated. If the key fields were left blank, it would be ambiguous which row to update, and the action wouldn't know where to apply the changes.

     

    If you have a situation where you want to update a row in Excel, and the row is not uniquely identifiable using specific key fields, you have a few options:

    1. **Using Filter and Loop**: Instead of using the "Update a row" action directly, you can first use the "List rows present in a table" action with a filter to retrieve the specific row(s) you want to update. Then, you can loop through the filtered rows and use the "Update a row" action for each row individually. This way, you can customize the logic to identify the correct row(s) to update based on specific conditions, and it allows you to avoid using key fields altogether.

    2. **Adding a Unique Identifier**: If possible, consider adding a unique identifier column to your Excel table. This column can serve as the key field, and you can use it to uniquely identify each row. If you have control over the data structure in Excel, this approach can simplify the update process.

    3. **Handling Null or Blank Values**: If you need to update cells in Excel that are initially blank, you can use the "Set variable" action to store the new value in a variable and then use the "Initialize variable" action to set a default value (e.g., "N/A" or "Not Provided") if the variable is null or empty. Afterward, you can use the updated variable value in the "Update a row" action.

     

    Remember that the approach you choose depends on your specific requirements and the structure of your Excel data. Always test your flow thoroughly to ensure it behaves as expected, especially when dealing with critical data updates.

    If you have a specific scenario or need help with a particular expression in your flow, feel free to share more details, and I'd be happy to assist further!

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 176 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 96 Super User 2026 Season 1

Last 30 days Overall leaderboard