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 / I can't use my collect...
Power Apps
Suggested Answer

I can't use my collection as a datasource to create a connection with a gallery

(0) ShareShare
ReportReport
Posted on by
Hello everyone.
I'm creating an app for my team and the purpose of it is to make a place where my stakeholders can request a "Contract creation"

For that, I'm using a collection called "ContractProducts". I've already named all the collumns, you can se my code below:
 
Collect(
    ContractProducts;
    {
        Conexão: DataCardValue49.Text;
        ID: 0;
        Produto: 'Contract material name'.Text;
        Quantidade: Value('Contract quantity'.Text);
        Unidade: 'Contract unit of measure'.SelectedText;
        Codigo: Value('Contract material code'.Text);
        Preço: Value('Contract material price'.Text)
    }
);;
ForAll(
    Sequence(CountRows(ContractProducts));
    Patch(
        ContractProducts;
        Last(FirstN(ContractProducts; Value));
        { ID: Value }
    )
);;
Reset('Contract material name');;
Reset('Contract quantity');;
Reset('Contract unit of measure');;
Reset('Contract material code')

I'm not understanding why I cant' use my collection as a datasource to a gallery. It's not appering as an option.
Did i do anything wrong on my code? Can anyone help me with this please? I've been asking ChatGPT, but he is not able to help me neither
Categories:
I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    7,431 Super User 2026 Season 1 on at
     
    I assume you are providing only the Name of the collection to the Items property gallery (as below).
     
    Items = ContractProducts (or) 'Your Name of Collection'
     
    In the gallery labels you are setting respective field values as 
    • ThisItem.Produto
    • ThisItem.Quantidade
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard