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 / filter and Patch error???
Power Apps
Unanswered

filter and Patch error???

(0) ShareShare
ReportReport
Posted on by 1,994

HI 

 

Can anyone help on this?  There's error...

 

I want search by PO number and patch the GR no on the record selected in the gallery Thanks

1.PNG

Categories:
I have the same question (0)
  • KrishnaV Profile Picture
    5,023 on at

    hi @bbsin,
    Could you share the error message what you see on the patch if it data mismatch convert the value as below:
    you don't need the forall and change the Patch as below:

    Patch(list/TableName,ThisItem,{GRNo:GRnoUpdateInout.Text})

    Write this onSelect property of the edit icon on the gallery



     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @bbsin 

    In the context of your formula, your GRnoUpdateInput is prepended with ThisRecord.  ThisRecord in your formula refers the the Patch record.

    Please consider changing your Formula to the following:

    Patch(yourList,
     ForAll(
     Filter(UpGRNoGal_1.AllItems, IsBlank(GRnoUpdateInput.Text)) As _item,
     {ID: _item.ID,
     POno: _item.GRnoUpdateInput.Text
     }
     )
    )
     

    Note: ForAll is a table function - it produces a table.  It's not a developer For/Loop, so in the above, the table is created and then sent to the Patch function to perform the Patch from the table records.

     

    I hope this is helpful for you.

  • bbsin Profile Picture
    1,994 on at

    hi @RandyHayes,

     

    Do I copy and paste the sytnax in ?  What is _item... 

     

    I follow and copy mine from a tutorial in YouTube 🙂

     

    Regards 

  • bbsin Profile Picture
    1,994 on at

    Hi @KrivshnaV,

     

    Noted with thanks

     

  • KrishnaV Profile Picture
    5,023 on at

    Hi @bbsin ,

     

    If the issue is not resolved let me know happy to help you anytime

  • bbsin Profile Picture
    1,994 on at

    @RandyHayes 

     

    Hi Randy,

     

    I copy your syntax, it not running.  the patch is a number field in SP list.. do I have to add anything?

     

     

    Thanks

  • KrishnaV Profile Picture
    5,023 on at

    Hi @bbsin ,

    Try this:

    Patch(yourList,
     ForAll(
     Filter(UpGRNoGal_1.AllItems, IsBlank(GRnoUpdateInput.Text)) As _item,
     {ID: _item.ID,
     POno: Value(_item.GRnoUpdateInput.Text)
     }
     )
    )
  • bbsin Profile Picture
    1,994 on at

    hI @KrishnaV 

     

    I input this 

     



    Patch('list',
    ForAll(
    Filter(GalGRno.AllItems, IsBlank(GRnoUpdateInput.Text)) As _item,
    {ID: _item.ID,
    POno: Value(_item.GRnoUpdateInput.Text)
    }
    )
    )

     

    it's not running?  no error message.

  • KrishnaV Profile Picture
    5,023 on at

    My bad try this to update only one record:

     

    Patch(list/TableName,ThisItem,{POno:Value(GRnoUpdateInout.Text)})

     

    I hope you are applying this formula onSelect property of the gallery.

  • bbsin Profile Picture
    1,994 on at

    hi

     

    is it 

    Patch('lst', Gallery, ThisItem,{POno:Value(GRnoUpdateInout.Text)})

     

    if it is .. there's errror..

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 Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard