web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Issue with April Dunna...
Power Apps
Unanswered

Issue with April Dunnam's timesheet app, clears out Bill To item from previous line when adding new item

(0) ShareShare
ReportReport
Posted on by

Love Aprils app, but have one issue where you click the + item to add new item to collection it blanks out previous item

seems fine when adding new item (Collection = newTimeEntry) , only with edit item (Collection = selectedTimeEntries)

 

i think anyone using this template will have this issue, hoping there is a simple fix

 

thank you in advance (added screenshot)

 

ONSELECT - New formONSELECT - Edit Form
Select(Parent);
Patch(
newTimeEntry,
ThisItem,
{
Employee: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & currentUser.Email,
Department: "",
DisplayName: currentUser.FullName,
Email: currentUser.Email,
JobTitle: "",
Picture: ""
},
BillTo: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: cbBillTo.Selected.ID,
Value: cbBillTo.Selected.Title
},
Mon: Value(tbMon.Text),
Tues: Value(tbTues.Text),
Weds: Value(tbWed.Text),
Thurs: Value(tbThurs.Text),
Fri: Value(tbFri.Text),
Sat: Value(tbSat.Text),
Sun: Value(tbSun.Text),
Comments: tbComments.Text
}
);
Collect(
newTimeEntry,
{
Employee: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & currentUser.Email,
Department: "",
DisplayName: currentUser.FullName,
Email: currentUser.Email,
JobTitle: "",
Picture: ""
},
BillTo:Blank(),
Mon: 0,
Tues: 0,
Weds: 0,
Thurs: 0,
Fri: 0,
Sat: 0,
Sun: 0,
Comments: ""
})
Select(Parent);
Patch(
selectedTimeEntries,
ThisItem,
{
Employee: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & currentUser.Email,
Department: "",
DisplayName: currentUser.FullName,
Email: currentUser.Email,
JobTitle: "",
Picture: ""
},
BillTo: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: cbBillTo.Selected.ID,
Value: cbBillTo.Selected.Title
},
Mon: Value(tbMon_1.Text),
Tues: Value(tbTues_1.Text),
Weds: Value(tbWed_1.Text),
Thurs: Value(tbThurs_1.Text),
Fri: Value(tbFri_1.Text),
Sat: Value(tbSat_1.Text),
Sun: Value(tbSun_1.Text),
Comments: tbComments_1.Text
}
);
Collect(
selectedTimeEntries,
{
Employee: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & currentUser.Email,
Department: "",
DisplayName: currentUser.FullName,
Email: currentUser.Email,
JobTitle: "",
Picture: ""
},
BillTo:Blank(),
Mon: 0,
Tues: 0,
Weds: 0,
Thurs: 0,
Fri: 0,
Sat: 0,
Sun: 0,
Comments: ""
})

 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @vandam2

    Two options

    • Use collect instead of patch to add a new record to your datasource: Collect(newTimeEntry, Defaults(newTimeEntry)) 
    • Replace ThisItem with Defaults(newTimeEntry) in your formula for adding a new item. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard