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 / Error when referencing...
Power Apps
Unanswered

Error when referencing text label into combo box and Issue with patch function needing record instead of text

(0) ShareShare
ReportReport
Posted on by 2

We have existing labels (B1, A10, B20, etc. )(Picture 1). When the user clicks a button in Pic 1, we want the combo box #2  on a separate screen (Pic 2) to populate with the label value in the same container as the button.

gadamcz_1-1711486908211.png

 

gadamcz_2-1711487350628.png

 

5 labels, 5 buttons next to it, one label equals one button. Combo box #2 has two properties: name and description. 

gadamcz_0-1711486829316.png

 

Also, when we try to submit this information, the Patch function does not work because of an error saying it requires a Record instead of Text values.

gadamcz_3-1711487776253.png

Code below: (table name redacted)

gadamcz_4-1711487872558.png

 

 

 

Categories:
I have the same question (0)
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Hi @gadamcz 

    If you want Combo box #2 to be populated when specific buttons are clicked in the gallery, use a collection.
    In the OnVisible property of the screen that contains the gallery:

     

    Clear(col_SelectedRecs);

     

     

    In the OnSelect property of the button in the gallery:

     

    Collect(
     col_SelectedRecs,
     {
     Name: ThisItem.X,
     Description: "Whatever you want"
     }
    )

     

    Where X is the value used to display B1, A10 etc

    In Combo box #2 in the the other screen, the DefaultSelectedItems property is:

    col_SelectedRecs

    You're going to need additional logic to stop the user from clicking the same button twice in your gallery.

     

    You should really ask your 2nd question in a separate post because it will be easier for members to find the solution to both of your questions if posted separately.

    If this doesn't work, please post the 2nd part separately. Change the patch for 'Audit Area'  to:

    cmbAuditArea1.SelectedItems

     

  • NetraVenkatapat Profile Picture
    4 on at

    @DJ_Jamba 

    Thanks for the reply. It worked until referencing the label to the combo box. My combo box has two fields, and I'm trying to create an empty record and patch the column with the name, area name, ..., but I have errors with 'Audit Area'. I tried using selected items as well with no luck.

     

    Error - "The type of this argument 'Audit Area' does not match the expected type 'Record'. Found type 'Table'. The function 'Patch' has some invalid arguments."

     

    NetraVenkatapat_0-1712237291071.png

    NetraVenkatapat_0-1712239273770.png

     

    TIA

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard