Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

ClearCollect

(0) ShareShare
ReportReport
Posted on by 3,263

Hello,

 

Quick question here?

 

I am having some hard time with my clearcollect function.

 

What I am trying to do is create a collection from a gallery, I am using the following formula:

 

ClearCollect(
SendtoFlow,
ShowColumns(
Gallery7.AllItems,
"Title",
"Item",
"UoM",
"Price",
"Quantity",
"LocationID"
),
{Customer: ComboBox3.Selected.Title},
{State: Label12_1.Text},
{POSNumber: Label12_2.Text},
{Quotation: Label12_3.Text}
)

 

 

These columns are for a different records like a purchase order style:

"Title", "Item", "UoM", "Price", "Quantity", "LocationID"

 

 

And this ones are for a one time use, like a purchase order header:

{Customer: ComboBox3.Selected.Title}, {State: Label12_1.Text}, {POSNumber: Label12_2.Text}, {Quotation: Label12_3.Text}, so this fields are outside of my Gallery7. But I was OK to retrieve in the formula.

 

Now I have a bad boy "Text Tield", and I am trying to retrieve inside the Gallery7 using a LookUp condition:

LookUp(Database,Lblitem.Text=ItemNumber,Description)

 

The reason why is because is a huge amount of text and I don' want to save it every time I have to create a Purchase Order.

 

Now Everything is fine until the point that I want to ADD that field to my Clear collect, once I have the description added I got an error and the Set JSON is not working also.

 

ClearCollect(
SendtoFlow,
ShowColumns(
Gallery7.AllItems,
"Title",
"BidItem",
"UoM",
"Price",
"Quantity",
"BuildingID",
"LblDescription"
),

 

Any idea?

 

Thanks in advance

 

Categories:
  • Sajarac Profile Picture
    3,263 on at
    Re: ClearCollect

    @v-yutliu-msft , and The enclosed screen shot show that the gallery items that I need but is also shows a field value inside a column. which is I guess that is the problem affecting my JSON data structure.

     

    Capture1.PNGCapture2.PNG

  • Sajarac Profile Picture
    3,263 on at
    Re: ClearCollect

    Hi there,

     

    thank you very much for your response,

     

    the items for my gallery7 are:

    Sort(Sort(Filter(LIPDatabase,CustomerID=Value(Label12.Text)),Title,Descending),ItemID,Ascending), plus some labels added which correspond to values from other tables i.e LabelCustomer = ComboBox3.Selected.Title etc.

     

    Will this help?

     

     

  • v-yutliu-msft Profile Picture
    on at
    Re: ClearCollect

    Hi @sajarac ,

    Could you show me the formula in Gallery7's Items?

    Since your last formula not work, so I need to know what table that "Gallery7.AllItems" represents.

    Based on your description, do you want to add a column named LblDescription that uses the value of "LookUp(Database,Lblitem.Text=ItemNumber,Description)" to data source and display in Gallery7?

    If so, I suggest you set Gallery7's Items:

    AddColumns(Database,"LblDescription",LookUp(Database,Lblitem.Text=ItemNumber,Description))

    What's more, you need to make sure that the table that Gallery7's Items represent have all these fields:

    "Title","BidItem","UoM","Price","Quantity","BuildingID","LblDescription".

     

     

     

    Best regards,

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1