Announcements
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.
Best regards
Flavio
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
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):
This is my gallery box:
And this is my button which is out of the gallery box. This button has the patch function on select:
I think I don't have more interesting thinks that you could need. If something is missing, please let me know
Thank you
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
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.
Based on the info I have, this should work, however we can make some more guesses:
Let me know if some of this works
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.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Haque 85
WarrenBelz 76 Most Valuable Professional
Kalathiya 38 Super User 2026 Season 1