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 / Patching data from com...
Power Apps
Unanswered

Patching data from combobox to SP list lookup column

(0) ShareShare
ReportReport
Posted on by 44

Hi, I am stumped as to what the solution is here.

 

I have an SP list which is to capture Timesheet details from an app. List is called TimesheetDetailsNew.

 

I have a column in this list that looksup to another list, BillingItemsNew, that contains all of the Billing Item codes users can select from.

 

On the app, there is a combobox that displays all of the billing items, using BillingItemsNew as the Items.

 

I need to be able to patch all data entered to the TimesheetDetailsNew SP list. I can get most of the data working apart from the Billing Items.

 

What I have is:

 

Patch(
TimesheetDetailsNew,
gblTimesheetCurrent,
LookUp(TimesheetDetailsNew, ID='Billing Item'.Id),
{'Billing Item': comboBillItems.Selected,
Status: {Value: "Submitted"},
Mon: Value(txt_Monday.Text),
Tues: Value(txt_Tuesday.Text),
Wed: Value(txt_Wednesday.Text),
Thur:Value(txt_Thursday.Text),
Fri:Value(txt_Friday.Text),
Sat:Value(txt_Saturday.Text),
Sun:Value(txt_Sunday.Text),
'Employee Email': Text(txtUserEmail.Text),
'Employee Manager': Text(txtUserManager.Text),
Organisation: Text(txtOrg.Text),
'Employee Job Title': Text(txtJobTitle.Text)
}
);

 

Which was close but still won't work.

 

Any advice will be appreciated

Categories:
  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @Jduggins 

     

    There is a problem in 'Billing Item': comboBillItems.Selected, instead use BillingItemsNew, Title = comboBillItems.Selected.Value

     

    Patch( TimesheetDetailsNew, 
    gblTimesheetCurrent,
    { 'Billing Item':
    { Id: Lookup( BillingItemsNew, Title = comboBillItems.Selected.Value, ID ).ID },
    Status: {Value: "Submitted"},
    Mon: Value(txt_Monday.Text), Tues: Value(txt_Tuesday.Text),
    Wed: Value(txt_Wednesday.Text), Thur: Value(txt_Thursday.Text),
    Fri: Value(txt_Friday.Text), Sat: Value(txt_Saturday.Text),
    Sun: Value(txt_Sunday.Text), 'Employee Email': Text(txtUserEmail.Text),
    'Employee Manager': Text(txtUserManager.Text), Organisation: Text(txtOrg.Text),
    'Employee Job Title': Text(txtJobTitle.Text) } )

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

  • Jduggins Profile Picture
    44 on at

    Apologies, I think I added some wrong code.

     

    However, even with some updates, something like this does not work:

     

    LookUp(TimesheetDetailsNew, Title='Billing Item'.Title),
    {'Billing Item': comboBillItems.Selected.Value,

     

    IS it because I have a combobox looking at one SP list but i'm trying to patch to another one? I really want to use the combobox and lookup column as this makes it easier for my users but i'v tried so many combos to get the patch function to work and I always get an error on this one thing.

  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Have you try this formula:

     

    Patch( TimesheetDetailsNew, 
    gblTimesheetCurrent,
    {
    'Billing Item':
    { Id: Lookup( BillingItemsNew, Title = comboBillItems.Selected.Value, ID ).ID },
    Status: {Value: "Submitted"},
    Mon: Value(txt_Monday.Text), Tues: Value(txt_Tuesday.Text),
    Wed: Value(txt_Wednesday.Text), Thur: Value(txt_Thursday.Text),
    Fri: Value(txt_Friday.Text), Sat: Value(txt_Saturday.Text),
    Sun: Value(txt_Sunday.Text), 'Employee Email': Text(txtUserEmail.Text),
    'Employee Manager': Text(txtUserManager.Text), Organisation: Text(txtOrg.Text),
    'Employee Job Title': Text(txtJobTitle.Text)
    }
    )

     

    Refer this link: Solved: Patch Lookup Field from Combobox - Power Platform Community (microsoft.com)

    Solved: How to patch a SP List 'B' Lookup column of SP Lis... - Power Platform Community (microsoft.com)

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

  • Jduggins Profile Picture
    44 on at

    No, that has not worked either

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard