Pro User
Timespan
explore our new search
​
Differences Between Update and UpdateIf in Power Apps
Power Apps
Oct 26, 2023 10:00 AM

Differences Between Update and UpdateIf in Power Apps

by HubSite 365 about Dhruvin Shah [MVP]

Microsoft MVP (Business Application & Data Platform) | Microsoft Certified Trainer (MCT) | Microsoft SharePoint & Power Platform Practice Lead | Power BI Specialist | Blogger | YouTuber | Trainer

Citizen DeveloperPower AppsLearning Selection

Learn the difference between Update and UpdateIf functions in Power Apps in our video guide - master Microsoft features with us!

When use Update and when UpdateIf

In the precise tutorial posted by Dhruvin Shah [MVP], we dive into an intriguing analysis of traditional Update function compared to the UpdateIf function in the sphere of Power Applications. This in-depth discourse walks us through the distinct purposes and techniques these functions fulfil and how to manoeuvre these functionalities effectively.

The Update function, according to this presentation, serves to replace an existing record in a data source. Interestingly enough, the UpdateIf function - on the other hand - has a different role to play. It modifies certain values in a record, whilst ensuring that the rest persist.

A step by step enlightenment on each function's syntax, along with an enlightening comparison, is also provided in this video.

  • Update: Primarily used to replace an entire record, leaving no values out. In the case of any particular column not receiving a new value, it is automatically updated to a blank value in the table. The syntax used is
    Update(DataSource, OldRecord, NewRecord [, All ]).
  • UpdateIf: This function enables alteration of specific columns, based on the conditions set. Its syntax is illustrated as follows:
    UpdateIf(DataSource, Condition1, ChangeRecord1 [, Condition2, ChangeRecord2, ... ]).

If you are interested in learning more about Power Apps, referring to the link would be beneficial.

The video proceeds to provide pragmatic examples with the 'Weathers' table, portraying how the Update and UpdateIf functions operate in distinct scenarios. Values in a table are updated based on certain conditions for larger understanding. All these instances elucidate how these functions cater to different column updates with multiple filters.

Finally, the discourse concludes, assuring viewers that any challenges they might encounter in utilizing these functions would be addressed in due course. This initiates a gateway for queries to be answered, adding value to the learning process.

Find more information also on this blog 

A Leap into Power Apps

Modern technology has brought about a host of digital applications that streamline business processes. One such potent tool is the Microsoft Power App which supports the creation and execution of custom business applications. Integrating with Microsoft 365, Power Apps enhance productivity by facilitating swift development with advanced capabilities while catering to different business needs.

 

 

Offering an interactive user interface, the platform allows developers to create applications with minimal coding. Moreover, it's excellent potential for extensibility and integration capabilities make Power Apps a favorite amongst businesses for enhancing their operations and digital presence. Varied functions like 'Update' and 'UpdateIf' provide the ability to alter the data flexibly, making it indispensable for data management. For beginners and professionals alike, Power Apps open a world of possibilities with their intuitive and versatile features.

 

Learn about Update Vs UpdateIf in Power Apps

 

In the video shared on YouTube, which is primarily delved into understanding the difference and usage of Update and UpdateIf function in Power FX platform. Below detailed guide will elaborate on the concepts and methods discussed in the video.

The Power FX offers users two primary functions to update data - Update and UpdateIf. The 'Update' function is used entirely to replace a record in your data source. On the other hand, UpdateIf and Patch functions are used to modify existing records, where one or more values in a record can be altered without disturbing other values.

Apart from a generic overview, in this guide, we will comprehend the syntaxes of these functions and distinguish between their functionalities with the help of numerous concrete examples.

A quick skim through the video tutorial chapters; you'll encounter topics such as:

  • The difference between Update and UpdateIf
  • The function of 'Update'
  • The function of 'UpdateIf'
  • How to bulk update records using UpdateIf

The Power FX platform syntax of Update function is written as Update( DataSource, OldRecord, NewRecord [, All ] ). It uses DataSource, OldRecord, and NewRecord as mandatory fields. The 'All' field which is used when updating multiple matching records, is optional. Remember if any specific column isn't provided with a new value, the Update function will transform that column into the blank.

Moving onto usage of UpdateIf function in Power FX platform, its syntax is written as UpdateIf( DataSource, Condition1, ChangeRecord1 [, Condition2, ChangeRecord2, ... ] ). Same as the Update function, the UpdateIf function also uses DataSource as the mandatory field. Additionally, it uses Condition(s) to filter data from DataSource and ChangeRecord(s) to change records satisfying the condition.

The examples provided further broaden understanding of the usage of these functions:

  • With the Update function when executed on 'Weathers' DataSource and replaced 'Temperature' column value while leaving the rest columns blank.
  • With the UpdateIf function executed on the same 'Weathers' DataSource, it achieved the goal to update 'Temperature' column value where 'Humidity' value was greater than one threshold and update both 'Temperature' and 'Outlook' column value where both 'Humidity' and 'Temperature' values were greater than some given thresholds.

Real-time, elaborate examples are shared, with input and output records, to grasp the implementation of these functions more clearly.

Therefore, after understanding the guide well, you'll see no difficulties using the Update and UpdateIf function in the Power FX platform. So, let's dive right into the Power FX world and leverage the fullest potential of your data!

Keywords

Update vs UpdateIf Power Apps, Power Apps comparison, Update Functions Power Apps, Power Apps UpdateIf, Power Apps functions, Update vs UpdateIf, Power Apps Update tips, Improve Power Apps, Power Apps function comparison, Power Apps Update vs UpdateIf difference.