web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

ClearCollect

(0) ShareShare
ReportReport
Posted on by 3,271

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
    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,271 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,271 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard