PowerApps Back to Basics - Update VS UpdateIf

Update and UpdateIf functions helpful to update the records using PowerApps.

Following are the syntax for Update and UpdateIf functions.

Update( DataSource, OldRecord, NewRecord [, All ] )

DataSource is - Source of the data to update the records

OldRecods - old records to be updated

NewRecord - New record to be updated

All - All is optional, if we mention this all the records matching this will be replaced.


UpdateIf( DataSource, Condition1, ChangeRecord1 [, Condition2, ChangeRecord2, ... ] )  

DataSource is - Source of the data to update the records

Condition1 - Conditions to get the records

Change Records - Records to be changed, i.e after satisfying the condition this records will be updated.

Following the two cases for Update and UpdateIf with Data

Update(EmployeeData, First(Filter(EmployeeData, EmpName ="Mike"  )), {EmpFirstName: "Mike"});

 In the above case, Update function will work on the filter data mentioned in the records

UpdateIf(EmployeeData, EmpID > 75 , {RecordIDRange: "Greater Than 75"});

Here in the UpdateIf function checking the condition to update the records.



Comments

Popular posts from this blog

Linksys Wireless Connection Failure

The security validation for this page is invalid. Click Back in your Web

Access Denied Host Header Sharepoint 2010 Windows Server 2008 R2