Hi,
I have 4 screens in my PowerApps. DataSource is Excel Table.
Screen1 contains Gallery tiles of systems, say "Sys1","Sy2","Sy3". When Clicks on any Gallery tile, it navigates them to Sceen2 which contains, instrument summary, also screen 2 contains information about system status [Available,In Use,OOS].
When user selects the system that is "Available", it displays 3 buttons on Screen 2 "Signup","Update Status" and "Cancel". When user selects "In Use" or "OOS", it displays only 2 button on screen2 "Update Status" and "Cancel".
OnSelecting "Signup" button on Screen 2 user navigates to Screen3, where user can put relevant information,and signup for the instrument. One of the column that is unique in this form "User ID" in text form (ex:john1)
When User Selects "Update Status" button from Screen 2, user navigates to Screen4. Where user can update the status of the system. I would like to allow end user to search for their ID and would like to pre-populate the edit form fields.
Ex: Let's say John wants to update the Status of Sys1 because he signed up for Sys1.When John clicks on Update Status it navigate him to Screen4, where he can enter his User ID and the fields such Model#,System# will be AutoPopulate for him. The only thing left form him will be to select correct system status from dropdown, and on submitting the button the status field will be populated in Excel Table.
Note I would like to Auto-populate field based on only last Entry by John.
I am not sure how to achieve this in PowerApps.
Any help is appreciated!
Brilliant! That worked perfectly. Thank you so much for all of your help and time!
Hi!
Did you try something like this?
Patch(
'Yearly Time Management',
First(Filter('Yearly Time Management',ID = vLastRecordOfUser.ID)),
{
StandardHours:TextInput5_StandardHours.Text,
TargetPercent:TextInput5_Target.Text,
DirectLaborHours:TextInput5_Direct.Text
}
)
regards!
Hi!
I populate by adding vLastRecordOfUser.StandardHours as Default in the TextInput fields and my UpdateContext per your example is:
UpdateContext(
{
vLastRecordOfUser: Last(
Filter(
'Yearly Time Management',
Upper(EmployeeName) = Upper(TextInput5_Search.Text)
)
)
}
)
And the Patch is as stated above.
Hi!
you are rigth with the commas!
you can edit just the columns you need to. How did you "populate" the vLastRecordOfUser variable? before you updates its fields.
I still get a second line entry. I got an error on the first semi-colon so I changed it to a comma and the error resolved. Here's the beginning of my Patch:
Patch('Yearly Time Management',vLastRecordOfUser;{StandardHours:TextInput5_StandardHours.Text,TargetPercent:TextInput5_Target.Text,DirectLaborHours:TextInput5_Direct.Text, ...
Does vLastRecordOfUser need to proceed each column/text field?
Ok, so, to update an item, just put the "object Item" as a second parameter of Patch formula
Continuing with my previous example:
UpdateContext(
{
vLastRecordOfUser: Last(
Filter(
Systems,
Upper('User') = Upper(TextInput1.Text)
)
)
}
)
You can use the patch Formula, like this:
Patch(
Systems,
vLastRecordOfUser,
{model: "test"}
)
Yes!
Hi!
Are you using "Patch" Function to update the item?
Actually, @dariobois - do you know how I would tie this Filter to the list item ID in Sharepoint so I'm updating an existing line of data and not creating a new one?
Great to know! Thanks for the information. Sounds like I won't be bothered by this in this app since I won't be likely to exceed 2K.
WarrenBelz
42
Most Valuable Professional
mmbr1606
41
Super User 2025 Season 1
MS.Ragavendar
36