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

Unknown Error on open and Today() vs. {[Variable]: Today()}

I've made an app connected to SharePoint,on the opening screen I've got a connection to a SharePoint List of previous orders filtered by the author.

 

Formula: (SortByColumns(Filter([ListName], StartsWith(Author.DisplayName, User().FullName)), "[Column]", If(SortDescending1, Ascending, Descending))

 

As the app opens up the "Unknown Error Occured" tab at the top shows up but there are no apparent effects as the list, indeed, does load. I've been working on two other screens recently (DetailScreen & AddItemScreen) but the error occurs on entry, before they are even opened 😕 Thescreen error reappears on refresh but not if I navigate to another screen and back.

 

Session ID: 04199891-0138-ddb0-2272-ca50b783ed1d

 

^This is my main concern, the following is a minor nuisance

 

There is an error on the AddItemScreen where a lookup to a SharePoint List Won't accept [Column Date w/o time] = [Variable initialized with {variable: Today()}], didn't get this error when I used [Column] = Today()

A temporary solution was checking for [column] = Text(Variable) which worked, but the server said Date doesn't compare to String, so currently I have Text(column)=Text(variable) which is suboptimal.

 

 

Any and all input valued 🙂 

-Ketill Antoníus Ágústsson
1 REPLY 1
v-micsh-msft
Community Support
Community Support

Hi @Ketill,

 

For the Date compare, take a try with the DateValue function.

DateValue, TimeValue, and DateTimeValue functions in PowerApps

Which in your scenario should be:

[column] = DateValue(Variable)

For the error message, it should be caused by the User() function, or the Author.DisplayName.

StartsWith(Author.DisplayName, User().FullName))

Adding the part above would remind you delegation issues. As the Startswith function here only works with String type (Here Author is a lookup type).

113.PNG

Please consider switch the StartsWith function with some String field, such as the Title. Then check to see if the error is still there.

Regards,

Michael

 

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

Helpful resources

Announcements
PA 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 Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (61,930)