cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
toby-at-yell
Level: Powered On

Formula evaluating differently in Internet Explorer

I have a formula I use in the DisplayMode of an Icon control. This formula is used to disable the control if two times overlap or are the same as existing entries in a SharePoint list.

The formula evaluates correctly in Chrome, Edge and FireFox, but in Internet Explorer it does not.

 

If(
    (DateDiff(
        DateTimeValue(
            Text(
                SelectedDay,
                "[$-en-US]yyyy-mm-dd"
            ) & " " & If(
                NewFromPeriod.Selected.Value = "AM",
                If(
                    Value(NewFromHour.Selected.Value) = 12,
                    0,
                    Value(NewFromHour.Selected.Value)
                ),
                If(
                    Value(NewFromHour.Selected.Value) = 12,
                    Value(NewFromHour.Selected.Value),
                    Value(NewFromHour.Selected.Value) + 12
                )
            ) & ":" & NewFromMinute.Selected.Value & ":00"
        ),
        DateTimeValue(
            Text(
                SelectedDay,
                "[$-en-US]yyyy-mm-dd"
            ) & " " & If(
                NewToPeriod.Selected.Value = "AM",
                If(
                    Value(NewToHour.Selected.Value) = 12,
                    0,
                    Value(NewToHour.Selected.Value)
                ),
                If(
                    Value(NewToHour.Selected.Value) = 12,
                    Value(NewToHour.Selected.Value),
                    Value(NewToHour.Selected.Value) + 12
                )
            ) & ":" & NewToMinute.Selected.Value & ":00"
        ),
        Minutes
    ) > 0) && If(
        OtherReason,
        !IsBlank(NewReason.Text),
        ReasonDropdown.Selected.Title <> "Other"
    ) && (CountRows(
        Filter(
            LocalEntries,
            DateTimeValue(
                Text(
                    OverTimeDate,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & StartHours & ":" & StartMinutes & ":00 "
            ) <= DateTimeValue(
                Text(
                    SelectedDay,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & NewFromHour.Selected.Value & ":" & NewFromMinute.Selected.Value & ":00 " & NewFromPeriod.Selected.Value
            ) && DateTimeValue(
                Text(
                    OverTimeDate,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & FinishHours & ":" & FinishMinutes & ":00 "
            ) >= DateTimeValue(
                Text(
                    SelectedDay,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & NewToHour.Selected.Value & ":" & NewToMinute.Selected.Value & ":00 " & NewToPeriod.Selected.Value
            ) || DateTimeValue(
                Text(
                    OverTimeDate,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & StartHours & ":" & StartMinutes & ":00 "
            ) >= DateTimeValue(
                Text(
                    SelectedDay,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & NewFromHour.Selected.Value & ":" & NewFromMinute.Selected.Value & ":00 " & NewFromPeriod.Selected.Value
            ) && DateTimeValue(
                Text(
                    OverTimeDate,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & StartHours & ":" & StartMinutes & ":00 "
            ) < DateTimeValue(
                Text(
                    SelectedDay,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & NewToHour.Selected.Value & ":" & NewToMinute.Selected.Value & ":00 " & NewToPeriod.Selected.Value
            ) || DateTimeValue(
                Text(
                    OverTimeDate,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & FinishHours & ":" & FinishMinutes & ":00 "
            ) > DateTimeValue(
                Text(
                    SelectedDay,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & NewFromHour.Selected.Value & ":" & NewFromMinute.Selected.Value & ":00 " & NewFromPeriod.Selected.Value
            ) && DateTimeValue(
                Text(
                    OverTimeDate,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & StartHours & ":" & StartMinutes & ":00 "
            ) <= DateTimeValue(
                Text(
                    SelectedDay,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & NewToHour.Selected.Value & ":" & NewToMinute.Selected.Value & ":00 " & NewToPeriod.Selected.Value
            )
        )
    ) = 0 && IsBlank(EditEntry) || CountRows(
        Filter(
            LocalEntries,
            DateTimeValue(
                Text(
                    OverTimeDate,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & StartHours & ":" & StartMinutes & ":00 "
            ) <= DateTimeValue(
                Text(
                    SelectedDay,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & NewFromHour.Selected.Value & ":" & NewFromMinute.Selected.Value & ":00 " & NewFromPeriod.Selected.Value
            ) && DateTimeValue(
                Text(
                    OverTimeDate,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & FinishHours & ":" & FinishMinutes & ":00 "
            ) >= DateTimeValue(
                Text(
                    SelectedDay,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & NewToHour.Selected.Value & ":" & NewToMinute.Selected.Value & ":00 " & NewToPeriod.Selected.Value
            ) || DateTimeValue(
                Text(
                    OverTimeDate,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & StartHours & ":" & StartMinutes & ":00 "
            ) >= DateTimeValue(
                Text(
                    SelectedDay,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & NewFromHour.Selected.Value & ":" & NewFromMinute.Selected.Value & ":00 " & NewFromPeriod.Selected.Value
            ) && DateTimeValue(
                Text(
                    OverTimeDate,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & StartHours & ":" & StartMinutes & ":00 "
            ) < DateTimeValue(
                Text(
                    SelectedDay,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & NewToHour.Selected.Value & ":" & NewToMinute.Selected.Value & ":00 " & NewToPeriod.Selected.Value
            ) || DateTimeValue(
                Text(
                    OverTimeDate,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & FinishHours & ":" & FinishMinutes & ":00 "
            ) > DateTimeValue(
                Text(
                    SelectedDay,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & NewFromHour.Selected.Value & ":" & NewFromMinute.Selected.Value & ":00 " & NewFromPeriod.Selected.Value
            ) && DateTimeValue(
                Text(
                    OverTimeDate,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & StartHours & ":" & StartMinutes & ":00 "
            ) <= DateTimeValue(
                Text(
                    SelectedDay,
                    "[$-en-US]yyyy-mm-dd"
                ) & " " & NewToHour.Selected.Value & ":" & NewToMinute.Selected.Value & ":00 " & NewToPeriod.Selected.Value
            ), If(IsBlank(EditEntry), false, ID <> EditEntry.ID)
        )
    ) = 0 && !IsBlank(EditEntry)),
    DisplayMode.Edit,
    DisplayMode.Disabled
)

EditEntry is a variable that stores an existing entry and LocalEntries is a Collection that is loaded from the remote SharePoint list.

 

Why is the behaviour different in Internet Explorer? Please don't tell me I need to tell users to move to a different browser. This is in an organisation were this is not an option, secondly Internet Explorer 11 is listed as one of the browsers that is supported. Compatability mode is not turned on for PowerApps either.

2 REPLIES 2
Community Support Team
Community Support Team

Re: Formula evaluating differently in Internet Explorer

Hi @toby-at-yell,

Could you please share a bit more about your issue?

I think this issue may be related to Time Zone. Please check if the Time Zone of your IE browser is the same as that within your SP list.

In addition, when working date times in PowerApps, the date times value from your SP list would be converted into UTC format automatically.

Please also take a try to run your app in In-Private Mode, then check if the issue is solved.

In addition, when running an app in IE, there are also some limitations with it. Some new features/functionalities of PowerApps are not supported within IE browser.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
toby-at-yell
Level: Powered On

Re: Formula evaluating differently in Internet Explorer

Hi @v-xida-msft

 

The timezone is set to the same as the SharePoint site and this shouldn't be browser specific as a user's timezone is set through the OS not the browser, so I doubt that it is this that is causing the problem.

 

Running PowerApps in IE Private mode makes no difference.

Please could you direct me to the documentation that details the limitations when using IE as all I can find is this page that details that IE 11 is supported with Compatibility View turned off - https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/limits-and-config