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 Platform Community / Forums / Power Apps / Post multiple items, u...
Power Apps
Answered

Post multiple items, using V4 CalendarPost Item, with 1 button click

(0) ShareShare
ReportReport
Posted on by

I'm using the Office365Outlook.V4 Calendar Post Item. 

 

The code I'm using (see below) allows me to add items to a calendar 1 at a time by clicking each item in a gallery.  Works perfectly. 

However, I'd like to be able to click once and have that click add multiple items to a calendar at the same time. I have all the items in a collection.  So, how would I get the collection of events combined so I can post them at the same time.  I'm having trouble figuring out how to do that?   

When using this code to post 1 item at a time, I preface the below with Set(varMeetingChild,ThisItem);

CindyZ_0-1705453024800.png

Thanks in advance for your consideration and guidance. 

Categories:
I have the same question (0)
  • BCLS776 Profile Picture
    8,994 Moderator on at

    You can have this run through all the items in your gallery using a structure like this:

    ForAll(myGallery.AllItems As aItem,
     Office365Outlook.V4CalendarPostItem(
    //Put the rest of your code here, replacing ThisItem with aItem
     )
    )

    It will run through the gallery items sequentially, which is probably no big deal for a small number.

     

    Hope that helps,

    Bryan

  • CindyZ Profile Picture
    on at

    Hey there, Brian -- so helpful and so hopeful!  Just wondering if you can explain what you mean by aItem?  I'm lost there. Thanks so much! 

  • BCLS776 Profile Picture
    8,994 Moderator on at

    No worries! In the code sample I provided, aItem is a record reference to the currently-processed record in the ForAll() function. It does much the same thing that ThisItem does in a gallery. It is created using the As operator and while not required in this situation, it is a good habit to have to help keep multiple record references straight.

     

    Bye for now,

    Bryan

  • Verified answer
    CindyZ Profile Picture
    on at

    Hi again, hopefully, just one more thing.  Here is my code.  I can't seem to get the filtering part correct.  Any ideas? 

    I simply want to filter my gallery so it sends invitations for only those items selected.  It is Checkbox1.  

     

    CindyZ_0-1705630156483.png

    Thanks again! 

     

  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    Try:

    ForAll(Filter(galAddToCalendarOptions.AllItems, Checkbox1.Value) As Invitations,
    //and so on
    // if you are using a modern checkbox, it will be Checkbox1.Checked

     

    Bryan

  • CindyZ Profile Picture
    on at

    Absolutely, FABULOUS! Worked perfectly.  You've saved my life!!

  • CindyZ Profile Picture
    on at

    Yikes, Bryan.  I accidentally checked mine as the solution!  Do you know if that can be undone.  I thought  you could have multiple solutions but I'm not seeing that at the moment.  I'm sorry.  If anyone is reviewing this, the actual solution is a combination of Message 5 (which Bryan helped with) and Message 6 -- couldn't have done it without Bryan!   

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard