cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ali1
Frequent Visitor

How do I make my flow more elegant (aka how do I make my basic date based booking system more refined) ?

Hi all 

 

I have created a flow that works fine. In a nutshell, Users fill out an MS Form and choose a date. When a valid date is chosen, a certain calendar event is pulled up & the user's email address is added to the event. The challenge I'm facing is: How do I make my flow more elegant? Right now there's a LOT of repetition and in reality, one few key elements are unique. Ideally, I thought I could do the following:

  1. Get the user to fill out the form. 
  2. On form submission - Get specific Calendar events
  3. Get Form response details 
  4. Use the Switch statement and on users "date and time" selection
  5. Get Event 
  6. Exit Switch and now "Update event"  

I can't do Step 6 in my "ideal flow" above, Right after 'Get Event' I DONT exit Switch and within the specific "Switch" lane I Update event, and then manually have to enter each field per Switch case. (This becomes a tedious problem when I have 30+ switches to update this way, not to mention I run out of screen space!) 

 

I've uploaded images of my flow   

 

1st half of flow1st half of flow2nd half2nd half

 

You'll notice that in the 2nd screenshot the "Update Event" box is in each Switch case is identical. Only the 'Get Event' above it is unique. Is there any way to make this more concise/elegant/fit easily within 1 screen (width-wise) ? 

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @Ali1,

 

You could initialize an array variable to store all those Date and Event ID into it as below:

Annotation 2020-08-12 151749.jpg

 

Then use Filter array to get the Date equals Date And Time answer:

Annotation 2020-08-12 151750.jpg

 After filter out, get corresponding Event ID to Get the event properties and then update it:

Annotation 2020-08-12 151751.jpg

 

Hope it could help you with something. 

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
PrasadAthalye
Super User
Super User

I think you can use If Condition instead of switch and use 'OR' operator to compare. Then you will get only 1 section under Yes branch where you can copy your Update event action.

 

P.S - Mark this as answer if it resolves your issue.

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Hi @PrasadAthalye  

 

I tried this before but ran into a similar logic issue: How do I get the unique event ID? My logic for the IF condition version was like so: 

  1. Get user response in form.
  2. Get specific events.
  3. Get Form response details. 
  4. IF "Date & Time" are equal to "18 Aug" or "19 Aug" or "20 Aug" ... Then goto Yes.  

I had to stop there because let's say a user chose 18 Aug, we have to get the specific Event ID for 18 Aug, THEN go to the Yes branch.  I don't know how to achieve this. 

 

Note: I'm an English School teacher, not a coder  - perhaps I'm missing something basic? 

 

Ali1_0-1597179855670.png

Do let me know. 

 

Thanks! 

v-litu-msft
Community Support
Community Support

Hi @Ali1,

 

You could initialize an array variable to store all those Date and Event ID into it as below:

Annotation 2020-08-12 151749.jpg

 

Then use Filter array to get the Date equals Date And Time answer:

Annotation 2020-08-12 151750.jpg

 After filter out, get corresponding Event ID to Get the event properties and then update it:

Annotation 2020-08-12 151751.jpg

 

Hope it could help you with something. 

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (36,985)