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 Apps
Unanswered

ClearCollect

(0) ShareShare
ReportReport
Posted on by 3,293

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:
I have the same question (0)
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    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,

  • Sajarac Profile Picture
    3,293 on at

    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?

     

     

  • Sajarac Profile Picture
    3,293 on at

    @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

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 294 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 169

Last 30 days Overall leaderboard