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 / Preload entire gallery...
Power Apps
Answered

Preload entire gallery, in order that the E-Mail sent contains all values

(0) ShareShare
ReportReport
Posted on by 8

Hello there,

first of all, these are my first days with PowerApps and I am encountering a number of problems, but this communty is awesome since I have always found a solution in this Forum, however now I am stuck I think with a noob issue:

I have a mailing but, which sends the content of a gallery to the current App user, this all works fine, but it only sends the first 12 Items that have loaded on screen, leaving the rest of the table empty. Now the user would have to scroll through the entire gallery so that the items are loaded and then hit the send Mail button in order to have all the neccessary data.

 

Is there a function that preloads the entire gallery? (It is a filtered gallery which displays max. 50 of the total 300 items in this sharepoint list)

If not, is there a possibility to automatically scroll the gallery to the bottom and back up, whenever the screen is loaded - so that the user does not have to do it on his own?

 

Best regards and kudos to this community!

 

EDIT: for the Email sending part I simply use a table and the concat function that retrives the data from MyGallery.AllItems

Categories:
I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    First user will apply filters on gallery. Then on your send mail button you can first create a collection. For eg.

    ClearCollect(colEmail,Gallery1.AllItems)

    This will create a collection with all the content in the gallery and then send that collection in email. This can all be done in a single button click event

  • tgoldi Profile Picture
    8 on at

    The filter is preset, so user do not filter on their own. I tried to create a collection, with the ClearCollect fx and but that in the Outlook connector, but the result ist the same. Only those items that are loaded in the gallery are sent. If i scroll through the gallery, the Mail sent contains all the data, otherwise the last rows are empty

  • Verified answer
    zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    I am putting code from one of my app. On Screen1 button "Send Email" i create a collection. and navigate them to screen 2 where there is a gallery and confirm button. Gallery displays data from collection testcol. 

    And confirm button's onClick is set to this(I will remove email ids from code):

     

    ClearCollect(
    tempcol,
    Filter(
    Gallery6.AllItems,
    !IsBlank(TotalIncentive),
    TotalIncentive <> 0
    )
    );
    Office365Outlook.SendEmailV2(
    "hr@p.com",
    "Incentive Report for the month of " & drpMonthForIncentive.Selected.Value,
    "<h3>Following is the incentive report for the Month of " & drpMonthForIncentive.Selected.Value & "</h3><br><br>" & "<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" & "<tr style='background-color:#efefef'>
    <th>Employee</th>
    <th>Incentive</th>
    </tr>" & "<tr>" & Concat(
    tempcol,
    "<td>" & appEmployee & " </td>
    <td>" & "₹" & TotalIncentive & " </td>
    </tr>"
    ) & "</table>",
    {
    Importance: "Normal",
    Cc: "mpatel@p.com;deven.patel@p.com;jaimin.shah@p.com;yavin.white@p.com"
    }
    );
    Notify(
    "Email Sent to HR",
    NotificationType.Success
    )

     

  • tgoldi Profile Picture
    8 on at

    Perfect, seems to filter the items from the original datasource into a collection does the trick!

    thank you

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Glad it worked

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 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard