Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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

 

 

 

  • NetraVenkatapat Profile Picture
    4 on at
    Re: Error when referencing text label into combo box and Issue with patch function needing record instead of text

    @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

  • DJ_Jamba Profile Picture
    2,815 Super User 2025 Season 1 on at
    Re: Error when referencing text label into combo box and Issue with patch function needing record instead of text

    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

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,957 Most Valuable Professional

Leaderboard