Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Help to make more efficient patching / updating?

(0) ShareShare
ReportReport
Posted on by

Hello,

 

Trying to build an 'inventory list' to track items basically. For this, i am certain my current process is flawed and was hoping someone may be able to point out my issues. Sometimes the trailer when 'swapped' is pulling incorrect info and rather slow to update. Hoping it is something simple I am overlooking? It currently works - although is slow and my current formulas are pretty error prone. I am hoping someone out there is able to help simplify the process and make it work better? 

 

Currently, the drop downs concencate any other 'door' that currently has a trailer value as "OPEN" to find the correct trailer based on ID

 

johnc222_0-1623936035874.png

 

Basically, each item has its own submit button and code is as follows 

 

DropDown 

 

If('374B1'.Text = "OPEN", Distinct(Filter('Trailer Tracking', Trailer.Value <> "OPEN"),Concatenate(Building.Value," - ", Dock.Value," - ", Trailer.Value," - ", Comments, Text(ThisRecord.ID))),Distinct(Filter('Trailer Tracking',Trailer.Value="OPEN"),Concatenate(Building.Value," - ", Dock.Value," - ", Trailer.Value, " - ", Comments, Text(ThisRecord.ID))))

 

Submit Button

ClearCollect( TrailerSwap,
 { 
 SelectedBuilding: Trim(First(FirstN(Split('374B1Choice'.Selected.Result, " - "),1)).Result),
 SelectedDock: Trim(Last(FirstN(Split('374B1Choice'.Selected.Result, " - "),2)).Result),
 SelectedTrailer: Trim(Last(FirstN(Split('374B1Choice'.Selected.Result, " - "),3)).Result),
 SelectedComments: Trim(Last(FirstN(Split('374B1Choice'.Selected.Result, " - "),5)).Result),
 SelectedID:Trim(Last(FirstN(Split('374B1Choice'.Selected.Result, " - "),4)).Result),
 CurrentID: LookUp('Trailer Tracking', '374B1'.Text = Trailer.Value , ID),
 CurrentTrailer: '374B1'.Text,
 CurrentBuilding: LookUp('Trailer Tracking', '374B1'.Text = Trailer.Value, Building.Value),
 CurrentDock: LookUp('Trailer Tracking', '374B1'.Text = Trailer.Value, Dock.Value),
 CurrentInspection: LookUp('Trailer Tracking', '374B1'.Text = Trailer.Value, 'Inspection Date'),
 CurrentComments: LookUp('Trailer Tracking', '374B1'.Text = Trailer.Value, Comments)
 } 
);

Patch('Trailer Tracking', LookUp('Trailer Tracking', Text(ID) = First(TrailerSwap).SelectedID),
 {Dock: {Value: First(TrailerSwap).CurrentDock}},
 {Building: {Value: First(TrailerSwap).CurrentBuilding}},
 {Status: {Value: Dropdown374B1.Selected.Value}},
 {Comments: First(TrailerSwap).CurrentComments}
);

Patch('Trailer Tracking', LookUp('Trailer Tracking', ID = First(TrailerSwap).CurrentID),
 {Dock: {Value: First(TrailerSwap).SelectedDock}},
 {Building: {Value: First(TrailerSwap).SelectedBuilding}},
 {Status: {Value: Dropdown374B1.Selected.Value}},
 {Comments: First(TrailerSwap).SelectedComments}
);

 

 

  • RezaDorrani Profile Picture
    RezaDorrani 12,141 on at
    Re: Help to make more efficient patching / updating?

    Hi @Anonymous 

     

    Bets option is to patch collection in one go (key is to have the schema matching).

    Watch - https://youtu.be/VzrarcM9W5k & https://youtu.be/8I0Pt_8I6k8

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

    Thanks,
    Reza Dorrani, MVP
    YouTube
    Twitter

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard