cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MelvinGRM
Helper II
Helper II

patch gallery textinput

Hi, 

 

I want to patch a textinput that i placed in my gallery. But when i use this code it is collecting/patch the same value of the input.

How can i patch / collect the unique input from quant.Text to my SPlist ? 

 

My code: 

The code works for me fine... except the same value problem of the quant.Text.

 

ForAll(MyCollection;Patch(Uitgeleend;Defaults(Uitgeleend);{Titel:Titel;Categorie:Categorie;Barcode:Barcode;project:Textcart.Text;datumretour:Datepick.SelectedDate; AantalUIT: Value (quant.Text)}))

 

 

 

Sp Lists: 

"techniekvoorraad" = Mycollection

sharepoint lists.png

app: 

I want to patch the green box input. (quant.text) 

problem 4.png

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@MelvinGRM 

You are working out of context of the Gallery - which is why you are getting the same value.  You need to base your Formula on the Gallery.

Something like this Formula would work in context:

ForAll(yourGallery.AllItems;
    Patch(Uitgeleend;
          Defaults(Uitgeleend); 
         {Titel:Titel; 
          Categorie:Categorie;
          Barcode:Barcode;
          project:Textcart.Text;
          datumretour:Datepick.SelectedDate; 
          AantalUIT: Value (quant.Text)
         }
    )
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@MelvinGRM 

You are working out of context of the Gallery - which is why you are getting the same value.  You need to base your Formula on the Gallery.

Something like this Formula would work in context:

ForAll(yourGallery.AllItems;
    Patch(Uitgeleend;
          Defaults(Uitgeleend); 
         {Titel:Titel; 
          Categorie:Categorie;
          Barcode:Barcode;
          project:Textcart.Text;
          datumretour:Datepick.SelectedDate; 
          AantalUIT: Value (quant.Text)
         }
    )
)

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks it works! 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,796)