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 / Perform two lookups fo...
Power Apps
Answered

Perform two lookups for same patch

(0) ShareShare
ReportReport
Posted on by 68

 Need help in updating master list

hi 

I performed a patch to update Issue qty in master list with this code.

 

Patch(
Consumable_Master,
LookUp(
Consumable_Master,
Value(Dropdown1.Selected.'Item Code') = Value('Item Code')
),
{'Issue Qty': Value(DataCardValue6.Text) + Value(Dropdown1.Selected.'Issue Qty')}
);

problem is

Now I need to update on two criteria.one is lookup performed in the formula.

and another is Type (choice data type) =Issue.

If Type = Purchase it should update PURCHASE qty in master list.

please help in devolping the formula.

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @likhith117 ,

     

    Could you please share more details about your scenario? Would you like to update different column's value base on the Type column which is a Choice column?

     

    If so, please try below formula:

     

    Switch(
     Type.Value,
     "Purchase",
     Patch(
     Consumable_Master,
     LookUp(
     Consumable_Master,
     Value(Dropdown1.Selected.'Item Code') = Value('Item Code')
     ),
     {
     'Purchase Qty': ...)
     }
     ),
     "Issue",
     Patch(
     Consumable_Master,
     LookUp(
     Consumable_Master,
     Value(Dropdown1.Selected.'Item Code') = Value('Item Code')
     ),
     {
     'Issue Qty': Value(DataCardValue6.Text) + Value(Dropdown1.Selected.'Issue Qty')
     }
     )
    );

     

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • likhith117 Profile Picture
    68 on at

    Hey @v-jefferni Thanks for the help its working.

     

    One problem is The submit button contains two functions Patch and submit form.

    If for example Someone didn't give any thing in required fields and click submit.The patch function updating the list but form not submitting.It becomes a problem in this case. please figure out a formula for this (Iferror kind of ones I expect)

    Screenshot (282).png
    Screenshot (283).png
    Screenshot (281).png
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @likhith117 ,

     

    Type selecting is a Combo box? If so, you will need:

    TypeCombobox.Selected.Value

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 414

#2
Valantis Profile Picture

Valantis 408

#3
timl Profile Picture

timl 339 Super User 2026 Season 1

Last 30 days Overall leaderboard