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 Apps / Only have updated reco...
Power Apps
Answered

Only have updated records show as 'Yes' in email

(1) ShareShare
ReportReport
Posted on by 67
Hello,
I'm having some trouble with my app. My app, if a record field matches the column 'Helper', takes the user to an 'Update' screen. The goal with the Update screen is to update a record if a match between the Helper column in Table1 and the Helper column in the collection is found. If not, it patches a new record to the data source/table (I'm using Excel). 
 
The problem: I'm trying to use UpdateIf to change the collection 'Revised' field to 'yes' if there's a match. However, when I use UpdateIf, it's updating ALL records in the collection Revised column to 'yes', (or in this case 'lasttest') not just the updated record. It shows up as:
Is it possible to have it so only the revised records show as 'yes' and the new records be blank/left alone? 
Any help is greatly appreciated.
 
Below is the code:
ForAll(
    collection1,
    If(
        IsBlank(LookUp(Table1, Helper = collection[@Helper])),
        Patch(Table1, Defaults(Table1),  {'BOL No': collection1[@'BOL No'],
        'Arrival Time': collectionname[@'Arrival Time'], 
        'Branch No':  collectionname[@'Branch No'], 
        'Date Received': collectionname[@'Date Received'],
        'Delivery Quality':  collectionname[@'Delivery Quality'],
        'Departure Time':  collectionname[@'Departure Time'],
        'Point of Contact':  collectionname[@'Point of Contact'],
        'Notification of Late Delivery via':  collectionname[@'Notification of Late Delivery via'],
        'Master Load ': collectionname[@'Master Load '],
        'Issue Code': collectionname[@'Issue Code'],
        'Item ID Ordered':  collectionname[@'Item ID Ordered'],
        'Item ID Shipped':  collectionname[@'Item ID Shipped'],
        'Qty Ordered':  collectionname[@'Qty Ordered'],
        'Qty Received': collectionname[@'Qty Received'],
        'Qty Shipped':  collectionname[@'Qty Shipped'],
        'Damage Description': collectionname[@'Damage Description'],
        Helper:  collectionname[@Helper],
        'Service Failure': collectionname[@'Service Failure'],
        'Customer Failure': collectionname[@'Customer Failure'],
        XFRNo:  collectionname[@XFRNo],
        Comments: collectionname[@Comments],
        Revised: ""
        }),
        Patch(Table1, LookUp(Table1, Helper = collectionname[@Helper]), ThisRecord, {Revised: "Yes"})
    )
)
; UpdateIf(Table1, Helper in collectionname[@Helper], {Revised: "Yes"});
 
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,976 Most Valuable Professional on at
    Hi kona134 
    Firstly Excel is a terrible data source and some things that should work simply do not, although your query
    Helper in collectionname[@Helper]
    presents further challenges as Excel will not execute it (the in FIlter is not supported). If you had a unique identifying field in your Table and your Table numbers are under your Data Row Limit, this rather clunky workaround may do the job
    With(
       {_Data: Table1},
       With(
          {
             _Records:
             Filter(
                _Data,
                Helper in collectionname[@Helper]
             )
          },
          ForAll(
             _Records As _R,
             Patch(
                Table1,
                Lookup(
                   Table1,
                   YourIDField = _R.YourIDField
                ),
                {Revised: "Yes"}
             )
          )
       )
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • Verified answer
    kona134 Profile Picture
    67 on at
    Hi,
    Firstly, thank you for the help! After doing some research and more fiddling around with it, I got the answer from Matthew Devaney's site. For me, this looked like the following:
    ForAll(
        Filter(collectionname, collectionID in Table1.ID),
        Patch(collectionname, ThisRecord, {columnname: "value"})
    )
    Now the emails work as expected and look like this:

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard