cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pablik01
Helper III
Helper III

Butto to add all to collection (button outside the gallery)


Hello, I have a problem, I would like to create a button outside the gallery that would be used to add all filled input fields to the collection called liczba. I went in that direction but it didn't work

 

 

ForAll(Zamowienie_lista.AllItems; Collect(Zamowienie; {liczba}))

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
pablik01
Helper III
Helper III

GOT IT!

 

ForAll(Filter(Asortyment_lista.AllItems;Value(liczba.Text)>0);Collect(Zamowienie;{Nazwa:'Nazwa asortymentu';Liczba:liczba.Text;Jednostka:'j.m.';Ind:Indeks}));;

View solution in original post

5 REPLIES 5
Drrickryp
Super User
Super User

@pablik01 
ClearCollect(liczba, Zamowienie_lista.AllItems)

not working

I did something like this

Collect(Zamowienie;{Liczba:liczba.Text})

but he only adds the last item that I entered (and I want him to add all that are filled in), I also need him to add a few more columns assigned to this number.

in short, I want it to do what the button does next to each row in the gallery only globally. This is the button code on the line:

Collect(Zamowienie;{Grupa:ThisItem.Grupa;Nazwa:ThisItem.'Nazwa asortymentu';Liczba:liczba.Text;Jednostka:ThisItem.'j.m.';Ind:ThisItem.Indeks});;
Drrickryp
Super User
Super User

@pablik01 

Funny, it works for me.  The gallery on the left is used by the button for creating the collection which is shown in the datatable on the right!1.jpg

for me he is shouting that ClearCollet should be a collection

 

pablik01_0-1660412176279.png

I need those inputText fields that are filled in to end up in a collection called Zamowienie. together with the other two columns (I download the data from the excel sheet)

 

pablik01
Helper III
Helper III

GOT IT!

 

ForAll(Filter(Asortyment_lista.AllItems;Value(liczba.Text)>0);Collect(Zamowienie;{Nazwa:'Nazwa asortymentu';Liczba:liczba.Text;Jednostka:'j.m.';Ind:Indeks}));;

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,162)