cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sierra_Alpha
Regular Visitor

Duplicate Warning

Hey everyone,

 

I am currently facing a challenge. I am creating an event app in which users will attend sessions they favourite, this favourite list will appear and display the selected sessions. This is all fine, however, I only want a user to be able to select one session during the available time slot i.e. from 10am-11am there are two available session and you can only choose one of them, if you choose both a warning appears to indicate that you already have a session booked during that time slot. 

 

How am I able to create this duplication warning? Would I use conditional formatting i.e. If Repeated Twice, Colour 1 otherwise Colour 2. Or is there another way?

 

Thank you!!

2 REPLIES 2
v-monli-msft
Community Support
Community Support

Hi @Sierra_Alpha ,

 

What is the data source and what is the control that you use to select the sessions in this app? 

 

Regards,

Mona

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

Hi Mona,

 

I am using CDS as my data source. So when I select the session, I have added a favourite button which adds that session to a new screen. The formula I am using is:

 

If(ThisItem.cr4f6_sessionid exactin (Filter([@'User Selected Sessions'],cr4f6_AttendeeIDV2.'Attendee Email'=User().Email)).cr4f6_SessionID.cr4f6_sessionid,
Remove([@'User Selected Sessions'],Filter([@'User Selected Sessions'],cr4f6_AttendeeIDV2.'Attendee Email'= User().Email,cr4f6_SessionID.cr4f6_sessionid=ThisItem.cr4f6_sessionid)),
Patch([@'User Selected Sessions'],
Defaults([@'User Selected Sessions']),{
cr4f6_AttendeeIDV2:(LookUp(Attendees,cr4f6_attendeeemail=User().Email)),
cr4f6_SessionID:(LookUp('Session Workshops',cr4f6_sessionid=ThisItem.cr4f6_sessionid))}))

 

All I want it to do now is warn me that I aleady have a session booked and cannot book another session during the same time period.

 

Kind regards,

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,231)