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 / Avoid delegation warni...
Power Apps
Answered

Avoid delegation warning for "in" operator

(0) ShareShare
ReportReport
Posted on by 96

Hello! I have a problem with delegation warning for "in" operator for the below formula. I have the formula on DisplayMode property of a submit button.

 

If(
 /* Your existing formula */
 IsBlank(
 First(Filter(
 SortByColumns( Calendar, "StartDate"),
 UserID = varEmployee.ID, Or( StartDate in workDayList.workDay, EndDate in workDayList.workDay)
 )) )
 ,
 DisplayMode.Edit, // Set to Edit if the formula is true
 DisplayMode.Disabled // Set to Disabled if the formula is false
)

 
How can I write the formula to have the same result. More precisely, that the StartDate and EndDate are within workDayList.workDay.

Thank you in advance!

Categories:
I have the same question (0)
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Calin_Mateut,

    Currently, the delegation issue caused by the in operator could not be solved.

  • Verified answer
    Calin_Mateut Profile Picture
    96 on at

    I managed to avoid delegation warning by replacing Calendar (SP list) with a collection that stores data from Calendar (SP list).

     

    If(
     /* Your existing formula */
     IsBlank(
     First(Filter(
     SortByColumns( colMonthGroup, "StartDate"),
     UserID = varEmployee.ID, Or( StartDate in workDayList.workDay, EndDate in workDayList.workDay) ||
     UserID = varEmployee.ID && First(workDayList).workDay >= StartDate && Last(workDayList).workDay <= EndDate
     )) )
     ,
     DisplayMode.Edit, // Set to Edit if the formula is true
     DisplayMode.Disabled // Set to Disabled if the formula is false
    )

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard