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 Automate / set variable without loop
Power Automate
Unanswered

set variable without loop

(0) ShareShare
ReportReport
Posted on by 353

I'm using a flow to get the name of an event at a set time in a calendar. 
The calendar is for booking parking spaces (there are 10 )

The step 'get calendar view of events' is set to 'top 1' item for each calendar. 

When I set a variable to the name of the calendar event it puts the action in a loop, and this makes the flow very slow (15 seconds+)

Is there a way to set the cariable to the calendar event name witout a loop?

nick9one1_0-1677673472429.png

 

 

Categories:
  • Sundeep_Malik Profile Picture
    6,501 on at

    Hey @nick9one1 

     

    Yes you can make the variable without a loop. For that do the following:

     

    Currently your apply to each would be looking like:

    Sundeep_Malik_0-1677674081457.png

     

    Now click on that value part, or double click it, when it becomes highlighted copy it somewhere, maybe a Notepad. [Copy by shortcut keys ctrl+c]

    After this click/double click on that title part, when it becomes highlighted copy it somewhere.

     

    Now your expressions should look like the following:

     

    1) @{outputs('Get_items')?['body/value']}

    2) @{items('Apply_to_each')?['Title']}

     

    Now remove the @ sign and curly brackets from both and from the second one remove items apply to each.

    Now mix them both by adding a 0 in square brackets:

     

    outputs('Get_items')?['body/value']?[0]?['Title']

     

    Now paste it in a new set variable action. This should work. You could have used a first function too, but it gives error sometimes.

     

    I hope this helps 🙂

     

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

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 263

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard