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 / Circular reference Issue
Power Apps
Answered

Circular reference Issue

(0) ShareShare
ReportReport
Posted on by 184

Hi:

We have an app that we are using the customize form function of a SharePoint 365 list.  When the user picks some dates for scheduling an event we would like to do a lookup to see if the combination of those dates already exists for this facility.  We can get the lookup to work in either a label control or a text input control.  Within the ON CHANGE method of the text input control we would like to set a variable like Set(varError, false); Set(varError,, true).; The variable does not change.  tried Reset(control name) and the value does not change, which we would then use in the Coalesce function below where we would change the control to:

Coalesce(Parent.Error,

If(varError = true,

"Schedule conflict" ),

"")

Would actually prefer to do the following but does not seem to work, throws a circular reference error.  We use a lookup on the text method of the TextInputCanvas1 control and it does return either a value or blank using the following:

Lookup(ROOMSV7,

(dtestartdate.SelectedDate = StartTime
&& Value(StartTimeHour.Value) <= Value(dtestarthour.Selected.Value)
&& Value(EndTimeHour.Value) >= Value(dtestarthour.Selected.Value)
) , StartTime)

THEN tired the below in the error property of one of the date controls on the form:

 

Coalesce(Parent.Error,

If(!IsBlank(TextInputCanvas1.Text) ,
"Schedule conflict"
),
"")

 

This throws a circular error when we used it in the above code.

 

Thank you

 

Chuck

Categories:
  • Verified answer
    v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @chtraywick ,

     

    I suppose you want to achieve the effect that when the user creates a record and the start time is between the start time and end time of a record, the time selected by the user will be reset and the user will be prompted.

    Please try this:

    Set the OnChange of start time date picker control:

    If(!IsBlank(LookUp(ROOMSSV7,Self.SelectedDate>=StartTimeColumnName&&Self.SelectedDate<=EndTimeColumnName)),Reset(Self)&&Reset(EndTimeDatePickerName)&&Notify("Schedule conflict"))

     If your start time and end time are not columns of type time, you can convert them like this:

    DateValue(ColumnName)

     

    Best regards,

    Rimmon Li

  • chtraywick Profile Picture
    184 on at

    Thank you will try that.  Much appreciated.

    Chuck

  • chtraywick Profile Picture
    184 on at

    Had to add that logic into the date and hour on change event but it worked, thanks again.

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
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard