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 / DataAdd with Textinput...
Power Apps
Unanswered

DataAdd with Textinput and Gallerybox

(0) ShareShare
ReportReport
Posted on by 42

Hi Everyone,

 

I have a question regarding building an App. So I have a Gallary-box with different Country's that can be selected. I also have for each country a Textinput, wehre a number (Months) can be added. Now I'm trying to use it in my Sharepoint but the patch function doesn't work as expected. It always gives me todays date from DateValue3 without the + Textinput.

schaffl2_0-1669638542602.png

schaffl2_1-1669638569074.png

Best regards

Flavio

Categories:
I have the same question (0)
  • FernandoTC Profile Picture
    222 on at

    Hi @schaffl2 ,

     

    I might need some additional info but I think I have some clues about what is failing.

    The piece of code you posted. Can you give the full code? Are you using a collect function? Patch?

     

    My guess is that you are referencing a control that is contained in a gallery (TextInput1.text) from outside the gallery context. What do I mean by that? If you use a property of a control that is contained in a gallery from a control that is outside that gallery, PowerApps cant determine the value you are referencing sice that value is calculated an evaluated for each row of the gallery (and each item).

     

    But to determine if that is the I think more info about the code and what functions you are using is needed.

     

    Regards

  • schaffl2 Profile Picture
    42 on at

    Hi @FernandoTC 

    Thank you for reaching out to me. I think your explanation could be right, because the button is out of the gallery box. SO here I share you my Patch function and everything: 

    So this is my Patch function(I deleted for the screenshot my sharepoint (normally nothing is red): 

    schaffl2_0-1669640073387.png

    This is my gallery box:

    schaffl2_1-1669640183661.png

    And this is my button which is out of the gallery box. This button has the patch function on select: 

    schaffl2_2-1669640247134.png

     

    I think I don't have more interesting thinks that you could need. If something is missing, please let me know

     

    Thank you

     

  • FernandoTC Profile Picture
    222 on at

    Hi @schaffl2 ,

     

    You got it almost right but the thing is, in the ForAll() function you are looping through a ComboBox named DataCardValue1. That is not what you want, you want to loop throught the items of the Gallery2 which contains the TextInput you are using in the patch function.

     

    Based on that screenshot I assume you select some countries in the ComboBox, then you display those countries in the Gallery2 and last you edit some fields for each country. If so, just replace:


    DataCardValue1.SelectedItems - for - Gallery2.AllItems in the first argument of the ForAll.

     

    Hope it helps

  • schaffl2 Profile Picture
    42 on at

    Hi @FernandoTC 

     

    Thanks for your answer. Unfortunately, it does not work. It does not give an error, but I just published to my SharePoint and if I click on Submit nothing happens. So, no Data is entered in the SharePoint list. Do you have any other Idea or why I can't submit? Because what you Written before is completely correct.

     

    Best regards

  • FernandoTC Profile Picture
    222 on at

    Hi @schaffl2 ,


    Based on the info I have, this should work, however we can make some more guesses:

     

    1. In the Patch function, the record you are trying to upload has a field called Country in which right now you are specifying the property ThisRecord.Value. Previously this was referencing the ComboBox.SelectedItems property, now it is referencing the Gallery2.AllItems property. Does the items property of the Gallery2 have this field with no null values?
    2. Also since you are introducing new records, you can just replace the Patch function with Collect() (Maybe doing this it works, but as I said, based on what I've seen Patch should be working already)

    Let me know if some of this works

  • schaffl2 Profile Picture
    42 on at

    Hi @FernandoTC 

    Unfortunately, nothing worked. 

    Thank you anyway

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
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard