cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

Include Browse gallery labels into collection

Hi All,

 

I am trying to achieve a small requirement. I have a browse gallery and within each gallery record there are multiple labels. what i want to do is to create a collection on button click containing all gallery items and  also append those labels of each gallery record into the gallery collection.

currently i am using the below code to collect my gallery items into a collection but the label value is not coming in the collection.

ClearCollect(
healthcheckup,
Gallery3.AllItems.Title,
Gallery3.AllItems.label_actualenddate
)


The label_actualenddate does not collect the label value of each gallery record.

 

How can this be achieved?

 

Thank you in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Responsive Resident
Responsive Resident

Hi @Jayant2 , 

To me I guess the formula seems to be wrong, if you can try this with certain modification as per your need would be great as this did work for me. 

 

ForAll( 
    Gallery4.AllItems,
    Collect( 
        ExportColGal4, 
        {
           
            Column1: Text(Gal4ACustId.Text),
            Column2: "I",
            Column3: 501,
            Column4: 10

        }
    )
    );

 

Then Use

 

Clear(YOurCollectionName)

 

To clear data after use 

OR 

the other way if you want to use ClearCollect is 

   ClearCollect(
        ExportColGal4, 
        {
           
            Column1: Text(Gal4ACustId.Text),
            Column2: Gal4ApproverEmail.Text
        }
    )
    

Make sure all the data types on the label are text if they are not text please use the text function to convert them as in the above example. 

The result with no error as below:

Tapesh_0-1610709431510.pngTapesh_1-1610709457490.png

 





 

"Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful. "

View solution in original post

2 REPLIES 2
Responsive Resident
Responsive Resident

Hi @Jayant2 , 

To me I guess the formula seems to be wrong, if you can try this with certain modification as per your need would be great as this did work for me. 

 

ForAll( 
    Gallery4.AllItems,
    Collect( 
        ExportColGal4, 
        {
           
            Column1: Text(Gal4ACustId.Text),
            Column2: "I",
            Column3: 501,
            Column4: 10

        }
    )
    );

 

Then Use

 

Clear(YOurCollectionName)

 

To clear data after use 

OR 

the other way if you want to use ClearCollect is 

   ClearCollect(
        ExportColGal4, 
        {
           
            Column1: Text(Gal4ACustId.Text),
            Column2: Gal4ApproverEmail.Text
        }
    )
    

Make sure all the data types on the label are text if they are not text please use the text function to convert them as in the above example. 

The result with no error as below:

Tapesh_0-1610709431510.pngTapesh_1-1610709457490.png

 





 

"Please do not forget to give kudos if you find the suggestion helpful or Accept it as a solution if works fine to help other users to find it useful. "

View solution in original post

Super User III
Super User III

You can also use;

 

ClearCollect(
healthcheckup,
ShowColumns(Gallery3.AllItems,"Column1","Column2"))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (12,694)