cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Save data in a collection

Hi all!

Im triying to save specific values in a collection, yesterday was working porpertly but today at the moment to save the same values nothing happens and the collection still empty, im using the next formula:

 

 

 

ForAll(
    Gallery7.AllItems;
    Collect(
        Evaluacion;
        {
            Categoria: Label9.Text;
            Topico: Title5.Text;
            Calificacion: Slider3.Value
        }
    )
)

 

 

 

When this was working the values were saved in the collection and then exported in a excel file via Power Automate:

Cesar_1888_0-1619711958556.png

 

So today im triying to save the same values in the collection but isnt working

Cesar_1888_1-1619712110976.png
This is how the app looks rigth now

Cesar_1888_0-1619712582662.png

 

 




4 REPLIES 4
RandyHayes
Super User
Super User

@Anonymous 

Your formula is backward and you are wasting the output of your ForAll.

 

Consider the following change:

Collect(Evaluacion;
    ForAll(Gallery7.AllItems;
        {
            Categoria: Label9.Text;
            Topico: Title5.Text;
            Calificacion: Slider3.Value
        }
    )
)

 

See if that is helpful and if not, let me know what the results are and we can proceed from there.

 

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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

Hi! @RandyHayes 

I tried the suggest change but still not working,

Also tried to create a new collection to discart that "Evaluacion" collection was corrupted but it doesnt work too.

Cesar_1888_0-1619715737433.png

Yesterday I used the format provided by x-vida-msft on this post and applied to my app and works

https://powerusers.microsoft.com/t5/Building-Power-Apps/Save-data-from-Gallery-in-collection/td-p/39...

And also if i remove the "ForAll" formula works again, but only save one records instead the 35 need it

Cesar_1888_1-1619715809918.png

Cesar_1888_2-1619715926417.png

 

RandyHayes
Super User
Super User

@Anonymous 

So technically the formula I provided should work for you.

But I am seeing some discrepancy in your pictures.

You show a gallery with califcacions of 5.  You then show a collection with 5 in it.  You then show an Excel file with 2 in it.  

Perhaps this is a clue as to something going wrong?

_____________________________________________________________________________________
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.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

@RandyHayes 

I used an old file as reference to show that is only saving one record.

Let me check all the things on the screen to see if there's anormally affecting the formula.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,813)