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 / 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 Super User 2025 Season 2 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

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard