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 / Patch a custom data ca...
Power Apps
Answered

Patch a custom data card (dropdown) to SP List with lookup column

(0) ShareShare
ReportReport
Posted on by 58
I have an SP List (2023 Matrix) with 32 columns, 2 of the columns are set to lookup (Nature of concern/Category & Details of concern/Sub-category) the lookup columns are getting data from another SP List (Category/Sub-category) and set the dropdown on power apps to cascading (ddCat with Items = Distinct('Category/Sub-Category',CatID) & ddCat with Items = Distinct(Filter('Category/Sub-Category',CatID=ddCat.Selected.Value),SubID)).
 
Apparently, when I setup a save button and setting the Patch function, I am having an error inserting the two columns.
 
Patch(
    '2023 Matrix',
    Defaults('2023 Matrix'),
    {
        'Agent Name': ddAgent1.Selected,
        Channel: ddChannel1.Selected,
        Title: txt_prm.Text,
        'Date Received': dte_rcd.SelectedDate,
        'Name of Client': txt_cnt.Text,
        'Contact Details': txt_ctc.Text,
        'Name of Member': txt_mem.Text,
        'SSS Number': txt_ssn.Text,
        'Ticket Priority': ddPrio.Selected,
        'Ticket Complexity': ddComp.Selected,
        'Classification Type': ddClass.Selected,
        'Date of Action': dte_act.SelectedDate,
        'Initial Action Taken': ddAct.Selected,
        'Referral Unit': ddRef.Selected,
        'Send as Status': ddStat.Selected,
        'Secondary Ticket Reference No.': txt_scd.Text,
        'CRMS Reference No. (If any)': txt_crm.Text,
        Division: ddDiv.Selected,
        Group: ddGroup.Selected,
        'Communication Channel': ddCommChan.Selected,
        'Date of Update to Hotline 8888 Portal/Client': dte_88.SelectedDate,
        'Initial Hotline 8888 Portal Status': dd88Stat.Selected,
        'Compliance Date of Referral Unit (SLA*24HR)': dte_comp.SelectedDate,
        'Date of Reply to Client': dte_rep.SelectedDate,
        'Date of Update to Hotline 8888': dte_upd.SelectedDate,
        'Last Tracer': dte_trc.SelectedDate,
        'Final Hotline 8888 Portal Status': ddfinal.Selected,
        SLA: txt_sla.Text,
        Remarks: txt_rmk.Text,
        Notes: txt_nte.Text,
Lookup('2023 Matrix', ID = 1), {
'Nature of concern/Category': {
Id: 2,
Value: Lookup('Category/Sub-category, ID = 2, CatID)}
    }
)

PS: I did not include the second dropdown with lookup column on SP list in the code since I am unable to proceed with the first.
 
Am I missing something? I am completely lost on this. Please help as I am new to Power Apps. 🙂
 
Thanks in advance.
Capture.PNG
Categories:
  • Verified answer
    developerAJ Profile Picture
    4,763 on at

    @RedcapVS 

     

     Notes: txt_nte.Text,
    Lookup('2023 Matrix', ID = 1), {
    'Nature of concern/Category': {
    Id: 2,
    Value: Lookup('Category/Sub-category, ID = 2, CatID)}
        }
     
    remove the highlighted part it should throw an error it does not have a column with it
     
    Remarks: txt_rmk.Text,
            Notes: txt_nte.Text,
    'Nature of concern/Category': {
    Id: 2,
    Value: Lookup('Category/Sub-category, ID = 2, CatID)}
     
    this should be sufficient.
     
    Please click Accept as solution and Thumbs Up. if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
  • RedcapVS Profile Picture
    58 on at

    It worked 🙂 Thanks a lot:)

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 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard