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 / Filter and collect SPL...
Power Apps
Answered

Filter and collect SPList with a custom textinput number

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I've been stuck on this for days, I'm looking to collect a SPList Product Gallery, with a quantity text box into a collection, and then I patch the order into a different SPList. 

I'm unable to collect quantity box, I've been trying filter and if functions, but I haven't managed to get it right.

 

SPList = ProductsGallery

 

I tried the following syntax

1- 

 

ForAll(OrderGallery.AllItems, If(!IsBlank(OrderQuantity.Text),Collect(OrdersCollection, {Quantity:Value(OrderQuantity.Text)},"")))

 

2-

 

ForAll(ProductsGallery.AllItems, Filter( ProductsGallery, OrderQuantity.Text > 0 ), Collect( OrderCollection, { PLI: PLI.Text, Quantity: OrderQuantity.Text } ) )

 

 

appreciate any tips and help. thanks.

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    You might consider the following for your formula:

    ForAll(
     Filter(ProductsGallery.AllItems, Value(OrderQuantity.Text)>0,
     Collect(OrderQuantity, {PLI: PLI.Text, Quantity: Value(OrderQuantity.Text)})
    )

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @RandyHayes - thanks for the reply.

    Unfortunately, this also didn't work.

     

    radhi-bh_0-1600898498393.png

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Always check for syntax from replies on this forum...we free-hand type the formulas and often miss parenthesis or commas.

    As was the case here...

    Formula should be:

    ForAll(
     Filter(ProductsGallery.AllItems, Value(OrderQuantity.Text)>0),
     Collect(OrderQuantity, {PLI: PLI.Text, Quantity: Value(OrderQuantity.Text)})
    )
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @RandyHayes  Wow, it was just that 1 missing paranthesis . I'm still very new to this, always aware of how much I still have to learn.

    Thanks for helping out.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Great!!  If that worked then please check off on Accept Solution so that others can find these answers quickly.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard